TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
StringTokenizing Program in Java
Alagunila Meganathan
Aug 03
2016
Code
466
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
StringTokenizing.rar
import
java.util.*;
public
class
StringTokenizing{
public
static
void
main(String[] args) {
StringTokenizer stringTokenizer =
new
StringTokenizer(
"You are tokenizing a string"
);
System.out.println(
"The total no. of tokens generated : "
+ stringTokenizer.countTokens());
while
(stringTokenizer.hasMoreTokens()){
System.out.println(stringTokenizer.nextToken());
}
}
}
Java