Java in a Nutshell, 5th Edition [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Java in a Nutshell, 5th Edition [Electronic resources] - نسخه متنی

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید


StringTokenizerjava.util

Java 1.0

When
a StringTokenizer is instantiated with a
String, it breaks the string up into tokens
separated by any of the characters in the specified string of
delimiters. (For example, words separated by space and tab characters
are tokens.) The hasMoreTokens( ) and
nextToken( ) methods obtain the tokens in order.
countTokens( ) returns the number of tokens in the
string. StringTokenizer implements the
Enumeration interface, so you may also access the
tokens with the familiar hasMoreElements( ) and
nextElement( ) methods. When you create a
StringTokenizer, you can specify a string of
delimiter characters to use for the entire string, or you can rely on
the default whitespace delimiters. You can also specify whether the
delimiters themselves should be returned as tokens. Finally, you can
optionally specify a new string of delimiter characters when you call
nextToken( ).


Figure 16-59. java.util.StringTokenizer

public class

StringTokenizer implements Enumeration<Object> {
// Public Constructors
public

StringTokenizer (String

str );
public

StringTokenizer (String

str , String

delim );
public

StringTokenizer (String

str , String

delim , boolean

returnDelims );
// Public Instance Methods
public int

countTokens ( );
public boolean

hasMoreTokens ( );
public String

nextToken ( );
public String

nextToken (String

delim );
// Methods Implementing Enumeration
public boolean

hasMoreElements ( );
public Object

nextElement ( );
}



    / 1191