Java StringTokenizer Class methods, constructors, variables available in Java 8 release are listed below. We will publish example program on each methods ASAP.
Constructors in Java StringTokenizer Class
S.No | Constructor & Description |
---|---|
1 | StringTokenizer(String str)
Constructs a string tokenizer for the specified string.
|
2 | StringTokenizer(String str, String delim)
Constructs a string tokenizer for the specified string.
|
3 | StringTokenizer(String str, String delim, boolean returnDelims)
Constructs a string tokenizer for the specified string.
|
Methods in Java StringTokenizer Class
S.No | Method & Description |
---|---|
1 | int countTokens() Calculates the number of times that this tokenizer’s nextToken method can be called before it generates an exception.
|
2 | boolean hasMoreElements()
Returns the same value as the hasMoreTokens method.
|
3 | boolean hasMoreTokens()
Tests if there are more tokens available from this tokenizer’s string.
|
4 | Object nextElement()
Returns the same value as the nextToken method, except that its declared return value is Object rather than String.
|
5 | String nextToken()
Returns the next token from this string tokenizer.
|
6 | String nextToken(String delim)
Returns the next token in this string tokenizer’s string.
|
Ask your questions in eHowToNow Forum
Post your technical, non-technical doubts, questions in our site. Get answer as soon as possible, meanwhile you can help others by answering, unanswered questions.
To Ask new Question : Ask Question
Check our existing discussions : Questions & Answers
To Ask new Question : Ask Question
Check our existing discussions : Questions & Answers
- Java – DoubleConsumer Interface
- Java – Base64.Encoder Class
- Java – IntBinaryOperator Interface
- Java – TimerTask Class
- Java – Date Class
- Java – ConcurrentHashMap Class
- Java – BooleanSupplier Interface
- Java – Set Interface
- Java – Consumer Interface
- Java – ConcurrentLinkedDeque Class
- Java – LongSummaryStatistics Class
- Java – PrimitiveIterator.OfDouble Interface
- Java – BaseStream Interface
- Java – ServiceLoader Class
- Java – Stack Class
Leave a Reply
You must be logged in to post a comment.