Question
hi, here am writing the method that count the words in a String but can anyone tell me plz how can i apply this to TextField? maybe i have to change whats written in the TextField to String? and how?
public static int Count(String s)
{
int wordCount=0, charCount=0;
String word;
StringTokenizer tokenizer;
tokenizer = new StringTokenizer(s);
while(tokenizer.hasMoreTokens()){
word=tokenizer.nextToken();
wordCount++;
charCount+=word.length();
}
return wordCount;
}
Thanks
Abed
> Tip: Try to use more specific subject lines.
> The more meaningful your subject, the more meaningful
> your replies.
Could you please stop posting these advices? There is no meaning to post this in threads which are "closed".
Can't you just post the message into threads which are still alive, and which you are posting answers to?
Kaj
kajbja at 2007-7-16 23:20:03 >

> > Can't you just post the message into threads which
> > are still alive, and which you are posting answers
> > to?
>
> Don't you see he's posting his "advise" all over the
> place?
Yes I've seen that, and that's why I told him to stop. I hate when he does that.
Kaj
kajbja at 2007-7-16 23:20:03 >
