+ 2

Write a program in java to accept a line and check how many consonants and vowels are there in line

Answer this plz

17th Mar 2022, 3:42 AM
Amit Kachchhatiya
2 Answers
+ 4
I would recommend looping through each character of the line and seeing if it equals any vowels and consonants. Create a counter variable and increase it by 1 if any of the characters equal the vowels and consonants.
17th Mar 2022, 5:09 AM
Isaac Nelson
Isaac Nelson - avatar
+ 3
Please share ur attempt so that community can help u.
17th Mar 2022, 3:44 AM
Rupali Haldiya
Rupali Haldiya - avatar