| Author |
"Cannot Resolve Symbols" Error
|
Freya Tan
Ranch Hand
Joined: Apr 14, 2004
Posts: 45
|
|
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
Joined: Oct 08, 2001
Posts: 2937
|
|
|
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
Joined: Apr 14, 2004
Posts: 45
|
|
How to i change this part in order not to user Split() ? can u pls help me..?
|
 |
Freya Tan
Ranch Hand
Joined: Apr 14, 2004
Posts: 45
|
|
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
Joined: Mar 18, 2004
Posts: 572
|
|
|
Post your code and tell what do you want to do?
|
 |
Freya Tan
Ranch Hand
Joined: Apr 14, 2004
Posts: 45
|
|
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
Joined: Apr 14, 2004
Posts: 45
|
|
|
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
Joined: May 15, 2001
Posts: 673
|
|
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
Joined: Dec 10, 2001
Posts: 7023
|
|
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.
|
[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
|
 |
Viniiee Math
Greenhorn
Joined: Apr 20, 2004
Posts: 4
|
|
Definitely StringTokenizer shud help you to get the result.
|
 |
 |
|
|
subject: "Cannot Resolve Symbols" Error
|
|
|