Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Mar 28th, 2010, 9:52 PM   #1
mastersteve10
Newbie
 
Join Date: Mar 2010
Posts: 18
Rep Power: 0 mastersteve10 is on a distinguished road
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.
mastersteve10 is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:41 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC