Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Java (http://www.programmingforums.org/forum17.html)
-   -   StringTokenizer not recognized (http://www.programmingforums.org/showthread.php?t=12998)

paulchwd Apr 14th, 2007 8:29 PM

StringTokenizer not recognized
 
Hello All,

I imported java.util.StringTokenizer;
and when i use

StringTokenizer st = new StringTokenizer(data);

i get this error:

C:\>javac Matrix.java
Matrix.java:32: cannot find symbol
symbol : constructor StringTokenizer(int)
location: class java.util.StringTokenizer
StringTokenizer st = new StringTokenizer(data);
^

any ideas?

Thnx

titaniumdecoy Apr 14th, 2007 8:34 PM

The StringTokenizer constructor takes a String argument, not an int.

ReggaetonKing Apr 14th, 2007 10:26 PM

T is right. It must be a String object in the constructor unless you are defining the delimiters.

Try that
:

StringTokenizer st = new StringTokenizer("" + data);

paulchwd Apr 15th, 2007 2:26 AM

OMG i cant believe i did that


All times are GMT -5. The time now is 2:23 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC