Click here to Skip to main content
15,888,257 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hello sir...how to get middle name using string tokenizer....???
eg..like name ANKIT it will select only K...!!!!
Posted
Comments
Sergey Alexandrovich Kryukov 14-Jun-12 1:28am    
Your e.g. is unclear. How come you consider as a token the letter "K" in ANKIT? :-) Could you strictly formulate what is a token?
--SA

1 solution

Tutorial @java-samples.com[^]

it will select "K" if the given String is "AN K IT". String Tokenizer can only find String parts that are delimited in some way (e.g. " "(space), "_", ";", "/", ...)
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900