Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 14th, 2007, 7:29 PM   #1
paulchwd
Hobbyist Programmer
 
paulchwd's Avatar
 
Join Date: Mar 2005
Posts: 139
Rep Power: 4 paulchwd is on a distinguished road
Exclamation 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
paulchwd is offline   Reply With Quote
Old Apr 14th, 2007, 7:34 PM   #2
titaniumdecoy
Expert Programmer
 
titaniumdecoy's Avatar
 
Join Date: Nov 2005
Posts: 855
Rep Power: 3 titaniumdecoy is on a distinguished road
Send a message via AIM to titaniumdecoy
The StringTokenizer constructor takes a String argument, not an int.
titaniumdecoy is offline   Reply With Quote
Old Apr 14th, 2007, 9:26 PM   #3
ReggaetonKing
Sexy Programmer
 
ReggaetonKing's Avatar
 
Join Date: Nov 2005
Location: New Jersey
Posts: 891
Rep Power: 3 ReggaetonKing is on a distinguished road
Send a message via AIM to ReggaetonKing
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);
__________________
I would love to change the world, but they won't give me the source code!
ReggaetonKing is offline   Reply With Quote
Old Apr 15th, 2007, 1:26 AM   #4
paulchwd
Hobbyist Programmer
 
paulchwd's Avatar
 
Join Date: Mar 2005
Posts: 139
Rep Power: 4 paulchwd is on a distinguished road
OMG i cant believe i did that
paulchwd is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
createStatement() not recognized paulchwd Java 8 Mar 8th, 2007 1:21 PM
File format not recognized Rojon Assembly 1 Dec 14th, 2005 5:34 PM
Urgent StringTokenizer help! beedubaya Java 3 Nov 20th, 2005 6:02 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:02 PM.

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