dantinkakkar 19 Junior Poster

@James, I think he means "words" by saying tokens, because, as he said, he wants "this" from "i want this". So I guess he wants to extract the third word.

[EDIT: Almost forgot this; dude gedas use a loop and a variable, name it as, say word_count and initialize it to 0. Loop through your string and increase word_count by 1 for every space you encounter. After the second space, you'll be on the third word. Loop through and record the String till the next space, and print to the screen.]

Philippe.Lahaie commented: James way is more efficient, thats what split() does. -1
dantinkakkar 19 Junior Poster

Well, I'm sorry for that, but you sounded like a little rude to me. So I hit back at you. Apologies for any mistake made by me.

~s.o.s~ commented: No worries +17
dantinkakkar 19 Junior Poster

Line 7 is the worst error a human can make :)
This won't help but I suggest to you that you go through "The Java Tutorials" (http://docs.oracle.com/javase/tutorial/) once. :P :D :) :P

DavidKroukamp commented: like you were never a nOOb, dont keep putting others down, just because you think bad of their code -2
DJSAN10 commented: Agree -1