Java – StringTokenizer Class

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

  1. Java – DoubleConsumer Interface
  2. Java – Base64.Encoder Class
  3. Java – IntBinaryOperator Interface
  4. Java – TimerTask Class
  5. Java – Date Class
  6. Java – ConcurrentHashMap Class
  7. Java – BooleanSupplier Interface
  8. Java – Set Interface
  9. Java – Consumer Interface
  10. Java – ConcurrentLinkedDeque Class
  11. Java – LongSummaryStatistics Class
  12. Java – PrimitiveIterator.OfDouble Interface
  13. Java – BaseStream Interface
  14. Java – ServiceLoader Class
  15. Java – Stack Class

Be the first to comment

Leave a Reply