Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Explain Stream Tokenizer?

Answer Posted / srinu

Stream Tokenizer from java.util package this class
implements Enumeration interface.This class break the string
into tokens with take parameter as delimeter

EX:-
import java.util.*;
public class Strtok
{

public static void main(String [] args)
{

String Demo = "This is a string that we want to tokenize";
StringTokenizer Tok = new StringTokenizer(Demo);
int n=0;
while (Tok.hasMoreElements())
System.out.println("" + ++n +": "+Tok.nextElement());
}
}

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a java string?

991


Explain enumeration in java?

954


Why do I need to declare the type of a variable in java?

992


Java.util.regex consists of which classes?

941


Explain different ways of creating a thread. Which one would you prefer and why?

983


What is hotjava?

950


What is the purpose of the runtime class in java programming?

1011


Can private members of a base class are inheritable justify?

870


What is a string what operation can be performed out with the help of a string?

967


Can list be null in java?

986


Why is method overloading not possible by changing the return type in java?

943


What is a consumer in java?

966


What does the @override annotation do?

966


What is the purpose of void?

950


How to compare two strings in java program?

1012