পৃষ্ঠাসমূহ

Search Your Article

CS

 

Welcome to GoogleDG – your one-stop destination for free learning resources, guides, and digital tools.

At GoogleDG, we believe that knowledge should be accessible to everyone. Our mission is to provide readers with valuable ebooks, tutorials, and tech-related content that makes learning easier, faster, and more enjoyable.

What We Offer:

  • 📘 Free & Helpful Ebooks – covering education, technology, self-development, and more.

  • 💻 Step-by-Step Tutorials – practical guides on digital tools, apps, and software.

  • 🌐 Tech Updates & Tips – simplified information to keep you informed in the fast-changing digital world.

  • 🎯 Learning Support – resources designed to support students, professionals, and lifelong learners.

    Latest world News 

     

Our Vision

To create a digital knowledge hub where anyone, from beginners to advanced learners, can find trustworthy resources and grow their skills.

Why Choose Us?

✔ Simple explanations of complex topics
✔ 100% free access to resources
✔ Regularly updated content
✔ A community that values knowledge sharing

We are continuously working to expand our content library and provide readers with the most useful and relevant digital learning materials.

📩 If you’d like to connect, share feedback, or suggest topics, feel free to reach us through the Contact page.

Pageviews

Thursday, January 19, 2017

Java.util.StringTokenizer Class

Introduction

The java.util.StringTokenizer class allows an application to break a string into tokens.
  • This class is a legacy class that is retained for compatibility reasons although its use is discouraged in new code.
  • Its methods do not distinguish among identifiers, numbers, and quoted strings.
  • This class methods do not even recognize and skip comments.

Class declaration

Following is the declaration for java.util.StringTokenizer class:
public class StringTokenizer
   extends Object
   implements Enumeration<Object>

Class constructors

S.N. Constructor & Description
1 StringTokenizer(String str)
This constructor a string tokenizer for the specified string.
2 StringTokenizer(String str, String delim)
This constructor constructs string tokenizer for the specified string.
3 StringTokenizer(String str, String delim, boolean returnDelims)
This constructor constructs a string tokenizer for the specified string.

Class methods

S.N. Method & Description
1 int countTokens()
This method calculates the number of times that this tokenizer's nextToken method can be called before it generates an exception.
2 boolean hasMoreElements()
This method returns the same value as the hasMoreTokens method.
3 boolean hasMoreTokens()
This method tests if there are more tokens available from this tokenizer's string.
4 Object nextElement()
This method returns the same value as the nextToken method, except that its declared return value is Object rather than String.
5 String nextToken()
This method returns the next token from this string tokenizer.
6 String nextToken(String delim)
This method returns the next token in this string tokenizer's string.

Methods inherited

This class inherits methods from the following classes:
  • java.util.Object

No comments:

Post a Comment