Question: I have a CSV file I am attempting to read into a Hashmap in Java to perform lookup functions. How would I best read the

I have a CSV file I am attempting to read into a Hashmap in Java to perform lookup functions. How would I best read the following file (cannot use packages such as CSV Reader unfortunately) to perform lookups based on certain key, value combinations. I know I have to create an object:

Map> demographics = new HashMap>(); 

The data is below:

Years,Population,Households,Income,Income per Capita,Income per Household,Children,Children per household 1999,18150,5500,907500000,50000.00,165000.00,6171,1.12 2000,18695,6030,898425000,48058.25,148980.58,6294,1.04 2001,19087,6362,907409250,47540.48,142621.45,6357,1.00 2002,18705,6235,918298161,49092.83,147278.48,6345,1.02 2003,18986,6308,899932198,47399.97,142673.91,6560,1.04 2004,19593,6320,937729350,47859.27,148363.75,6626,1.05

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!