When is StringTokenizer used in Java

The Eduladder is a community of students, teachers, and programmers just interested to make you pass any exams. So we solve previous year question papers for you.
In eduladder you can Ask,Answer,Listen,Earn and Download Questions and Question papers.
Watch related videos of your favorite subject.
Connect with students from different parts of the world.
Apply or Post Jobs, Courses ,Internships and Volunteering opportunity. For FREE
See Our team
Wondering how we keep quality?
Got unsolved questions? Ask Questions

10is753-Unit--1-java-and-j2ee-->View question

When is StringTokenizer used in Java?

StringTokenizer is a String Handling mechanism in Java, similar to StringBuffer.


Asked On2017-12-05 11:59:03 by:thegdx

Taged users:
AchinTholakelemmodi1995metaphor

Likes:
thegdx

Dislikes:
Be first to dislike this question
Talk about this  Delete  Like  Dislike
View all qusetions

You might like this video:Java Eclipse
Watch more here

Watch more videos from this user Here

Learn how to upload a video and start earning here

Answers

The java.util.StringTokenizer class allows you to break a string into tokens. It is simple way to break string.

It doesn't provide the facility to differentiate numbers, quoted strings, identifiers etc. like StreamTokenizer class. We will discuss about the StreamTokenizer class in I/O chapter.


Answerd on:2018-06-13 Answerd By:Sai-kiran

Likes:
|Sai-kiran

Dislikes:
Be first to dislike this answer
Talk about this  Delete  Like  Dislike

You might like this video:Network and IP Address
Watch more here

Watch more videos from this user Here

Learn how to upload a video and start earning here

tringTokenizer class in Java with example | Set 1 ( Constructors)

StringTokenizer class in Java is used to break a string into tokens.

Example:
stringtokenizer

A StringTokenizer object internally maintains a current position within the string to be tokenized. Some operations advance this current position past the characters processed.
A token is returned by taking a substring of the string that was used to create the StringTokenizer object.



Constructors:

StringTokenizer(String str) :
str is string to be tokenized.
Considers default delimiters like new line, space, tab, 
carriage return and form feed.

StringTokenizer(String str, String delim) :
delim is set of delimiters that are used to tokenize
the given string.

StringTokenizer(String str, String delim, boolean flag):
The first two parameters have same meaning.  The flag 
serves following purpose.

If the flag is false, delimiter characters serve to 
separate tokens. For example, if string is "hello geeks"
and delimiter is " ", then tokens are "hello" and "geeks".

If the flag is true, delimiter characters are 
considered to be tokens. For example, if string is "hello
 geeks" and delimiter is " ", then tokens are "hello", " " 
and "geeks".

Answerd on:2019-06-19 Answerd By:avi738

Likes:
Be first to like this answer

Dislikes:
Be first to dislike this answer
Talk about this  Delete  Like  Dislike

You might like this video:Web Development Introduction
Watch more here

Watch more videos from this user Here

Learn how to upload a video and start earning here



Lets together make the web is a better place

We made eduladder by keeping the ideology of building a supermarket of all the educational material available under one roof. We are doing it with the help of individual contributors like you, interns and employees. So the resources you are looking for can be easily available and accessible also with the freedom of remix reuse and reshare our content under the terms of creative commons license with attribution required close.

You can also contribute to our vision of "Helping student to pass any exams" with these.
Answer a question: You can answer the questions not yet answered in eduladder.How to answer a question
Career: Work or do your internship with us.Work with us
Create a video: You can teach anything and everything each video should be less than five minutes should cover the idea less than five min.How to upload a video on eduladder