Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

"Cannot Resolve Symbols" Error

 
Freya Tan
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have got this error.. no sure what happen.. can anyone help me.. Urgently..
D:\Stephenie\School Work\Yr1 Semester 2\Java Project\AppointmentPage.java:109: cannot resolve symbol
symbol : method split (java.lang.String)
location: class java.lang.String
bits = line.split(";");
^
My code
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The method split() of the String object is a new feature in JDK 1.4. Chances are, your compiler is older than that. Either upgrade to 1.4 or don't use split().
 
Freya Tan
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to i change this part in order not to user Split() ?
can u pls help me..?
 
Freya Tan
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can i change this part in order to avoid using Split() ?
can u pls help me..? Urgently..
(Post again becos of my typo error, Sorry)
 
Ali Gohar
Ranch Hand
Posts: 572
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Post your code and tell what do you want to do?
 
Freya Tan
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the code given by one of the moderator..
Let me explain how my program works..
1) User has to select the Month & Year from the JComboBox, as well as the date from the JList and then click on the "Display App" button
2)this would however get the whatever data store under the date, month, year from textfile named("Appointment.txt")
3)and display in the 3 textfield (dayInput, timeInput & appInput)
That's about it..

i have to avoid using Split() becos of the JDK1.4 thing.. my sch is using a JDK1.3.. so i have to avoid using this.. can u knidly pls help me.. i need a reply asap.. Urgently.. Thank u very very much..
[ edited to format code and to break really long lines -ds ]
[ April 19, 2004: Message edited by: Dirk Schreckmann ]
 
Freya Tan
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Very sorry.. it's kind of messy and difficult for u to read.. but pls dun give up on helping me.. THANKS.. !!
 
Nigel Browne
Ranch Hand
Posts: 703
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look at the java.util.StringTokenizer class, should be what you need.
HTH
Nigel
[ April 19, 2004: Message edited by: Nigel Browne ]
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Freya,
When asking folks around here for help, it's probably in your best interest to make it as easy as possible for folks to help you. So, if you're curious to learn how to break a String apart, posting 300 lines of unformatted GUI code that won't even compile and mostly has nothing to do with your question is probably not a good idea.
As suggested, to break your String apart, you'll likely want to make use of the StringTokenizer class. If you're not sure how to use it, a good way to begin to learn might be to take a look at the J2SE API documentation.
After you've tried something, possibly by using a small practice application, if you can't quite figure it out, post a question including what you're working on (with relevant and well-formatted code only). Try to explain what you're trying to do and in detail the problems you're having. These problems might include compiler errors, runtime errors, and/or unexpected runtime results.
 
Viniiee Math
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Definitely StringTokenizer shud help you to get the result.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic