Or pass the name of the file in the args to the main method, then continue as above.
NormR1
Posting Expert
6,677 posts since Jun 2010
Reputation Points: 1,138
Solved Threads: 656
pass the name of the file in the args to the main method using the command line
NormR1
Posting Expert
6,677 posts since Jun 2010
Reputation Points: 1,138
Solved Threads: 656
NormR1
Posting Expert
6,677 posts since Jun 2010
Reputation Points: 1,138
Solved Threads: 656
NormR1
Posting Expert
6,677 posts since Jun 2010
Reputation Points: 1,138
Solved Threads: 656
Then I don't understand what your problem is.
Can you explain?
NormR1
Posting Expert
6,677 posts since Jun 2010
Reputation Points: 1,138
Solved Threads: 656
I need to read the file into the Map..
What data structure/object are you using to store the data that you read in from the file?
Do the job in several steps:
1) read and parse the data into objects
2) save the objects in a collection
3) save the collection in a Map
If these are the steps you need to do, which steps are you having problems with?
NormR1
Posting Expert
6,677 posts since Jun 2010
Reputation Points: 1,138
Solved Threads: 656
Do you really not indent your code?
Or was there a problem when you posted it?
Unindented code like you have posted is harder to read and understand.
What is the purpose of the code you posted?
Can you copy and paste here the command prompt's console from when you execute your code.
It should show the input to the program and all the program's printed output.
To copy the contents of the command prompt window:
Click on Icon in upper left corner
Select Edit
Select 'Select All' - The selection will show
Click in upper left again
Select Edit and click 'Copy'
Paste here.
NormR1
Posting Expert
6,677 posts since Jun 2010
Reputation Points: 1,138
Solved Threads: 656
Did the program do what you wanted?
If not you need to add some comments to its output describing what is wrong.
When you print out the values of variables, you should include the name of the variable in the printout:
fName=file1.csv
NormR1
Posting Expert
6,677 posts since Jun 2010
Reputation Points: 1,138
Solved Threads: 656