Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

constructor StringTokenizer

Status
Not open for further replies.

ttea

IS-IT--Management
Feb 24, 2003
11
HK
some of my code:

for (int i=0; i<size; i++)
{
java.util.StringTokenizer st = new java.util.StringTokenizer(check, &quot;,&quot;);
id1 = st.nextToken();
id2 = st.nextToken();

}

an error:
cannot resolve symbol
symbol : constructor StringTokenizer
(java.lang.String[],java.lang.String)

location: class java.util.StringTokenizer
java.util.StringTokenizer st = new java.util.StringTokenizer(check, &quot;,&quot;);

error point to &quot;new&quot;
what's wrong??


 
It looks like you are trying to pass array of Strings,
as the first parameter to StringTokenizer constructor.
StringTokenizer demands String as the first parameter.

Maybe you should use something like:
java.util.StringTokenizer st =
new java.util.StringTokenizer(check, &quot;,&quot;);

Hope this helps (if you did not find it so far)
Grzegorz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top