I am having trouble getting it to work.
Please explain the problem you are having.
Another (and better) approach would be to use an ArrayList to hold the lines from the file.
NormR1
Posting Sage
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16
when trying to run it, i have an error
If you want help with the error, you must post the full text of the message here.
NormR1
Posting Sage
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16
Can you compile your code and generate error messages showing error message and the source line and the line number where the error occurred?
Here is what I get when I compile with an error:
Please copy full text of error message and paste it here. Here is a sample:
TestSorts.java:138: cannot find symbol
symbol : variable var
location: class TestSorts
var = 2;
^
Where is the variable bf defined?
NormR1
Posting Sage
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16
Where is the variable: readLines defined?
There is a method: readLines()
but the error message says variable, not method. Did you leave off the ()s?
NormR1
Posting Sage
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16
The error message says variable, not method???
What do you find if you Search your code for readLines?
NormR1
Posting Sage
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16
Use the Edit Search menu item in your editor/IDe to find all the occurrences of readLines in your program.
Do they all end with ()s or are they any without the ending ()?
The error message you posted:
symbol: variable readLines
says that the missing symbol is a variable, a method would end with ()s
NormR1
Posting Sage
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16
it still doesnt seem to want to work...
What happens?
NormR1
Posting Sage
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16
NormR1
Posting Sage
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16