![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Mar 2010
Posts: 18
Rep Power: 0
![]() |
Java Quick method help
I have been trying to figure out a code for counting vowels and one for counting white spaces but have no idea how to have variables entered by a user converted to a number. what i have so far is -
{ public static void main(String[] args) { String Entry; int count = 0; char a = a, e, i, o, u; Scanner input = new Scanner(System.in); System.out.print("Enter your statement and I will count your vowels "); Entry = input.nextLine(); if(Entry.isLettersOrDigits(a)) count = count + 1; System.out.print("Your statement had " + count + " vowels entered."); } } no idea what should be kept and what to continues, as this is nowhere near how i started writing it, just after two hours of reading and testing i rewrote it manys over trying different ()method. I would appreciate any help and the quicker the better as i need this done tonight. |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| progam to call a method in Java | sophia | Java | 2 | Feb 27th, 2010 10:37 PM |
| How to create a method treeview in java | franklon84 | Java | 2 | Jan 12th, 2009 7:26 PM |
| failed quick sort method | juggernot | Java | 7 | Sep 27th, 2008 4:59 PM |
| Quick java program | Yarvin | Java | 14 | Feb 12th, 2006 9:43 PM |
| quick question about java labels | thenewkid | Java | 1 | Sep 8th, 2005 1:52 AM |