![]() |
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 |
The StringTokenizer constructor takes a String argument, not an int.
|
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); |
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