The Artima Developer Community
Sponsored Link

Java Answers Forum
stringTokenizer

1 reply on 1 page. Most recent reply: Jun 13, 2002 8:16 AM by Pradeepta Bhattacharya

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Azrul Azhar

Posts: 9
Nickname: bllizard
Registered: Jun, 2002

stringTokenizer Posted: Jun 10, 2002 12:49 AM
Reply to this message Reply
Advertisement
if i call a string from jsp can it be tokenized by the string tokenizer function.
public static void main(String[] args)
{
String sIn = "a,b,c,d,e,f,z, tope,k ";


Restricted oMT = new Restricted (sIn, ",");
int iTokens = oMT.countTokens();


int i =0;
while(oMT.hasMoreTokens())
System.out.println(oMT.nextToken());


}

let say the text field name is 'text1' and the input is "a,b,c," can it be tokenized as a b c ?


Pradeepta Bhattacharya

Posts: 3
Nickname: dodo1975
Registered: Jun, 2002

Re: stringTokenizer Posted: Jun 13, 2002 8:16 AM
Reply to this message Reply
hey what is the problem in using StringTokenizer ... first do a getParameter(Text1) and it returns you a String and then you use StringTokenizer to get different tokens.... is this the solution .... or please clarify the question a bit more ... okay
cheers
Pradeepta

Flat View: This topic has 1 reply on 1 page
Topic: Garbage collection Previous Topic   Next Topic Topic: popup inconsistency

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use