a JAVA program that would input a string and display the total number of vowels and total number of consonants. (use method)
Input a string: beautiful
Total Vowels: 5
Total Consonants: 4

7 Years
Discussion Span
Last Post by Godstryke

Can someone give me a code for this? ...

Yes. I won't though. Read the terms and conditions of this site, again, please. You have read them at least once, already, right?

System.out.println("I am not putting any effort to code my homework");
Votes + Comments

Guys, please drop this mocking it doesn't help any of us.

@loozax you should be aware that there is a rule on this forum which says "We only give homework help to those who show effort". So presuming that you still on this task I would recommend you do some coding, post code and ask questions related to code or specific issue and not general request to do your homework


Oh, I had to do this one too!

I suggest you start by putting everything you can down in code and then when/if you get stuck the post what you have and we can help you through it. The toughest part is getting yourself started.


Identify what the program needs to do very specifically.

  • Prompt the user to input a String
  • Separate the String into separate characters
  • Identify the case of each letter
  • Tally up the number of each type of character
  • Ignore the characters that aren't letters
  • Display the final tally

Briefly list out ways in which you could do each component and then you'll have a much better idea of how to string everything together with code.

To start you off:
Everything you need should be on these two pages:

Good luck.

Votes + Comments
Excellent ideas :)
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.