****text file format:****
FirstName,lastname,role,startdate,emptype
sreedhar,reddy,Admin,20-2-2018,contract
shekar,kumar,Admin,20-2-2018,contract
RAJ,roy,Admin,20-2-2018,contract
somu,reddy,Admin,20-2-2018,contract
sumanth,reddy,Admin,20-2-2018,contract
Question:
How to read the text file and how to put in Map (Key ,vaule);
first line has key in map (ex: firstname,lastname,ect)
Second line on onwards value in map(eg:sreedhar,reddy,ect)
Map output:{Firstname:sreedhar,Lastname:reddy,role:Admin,startdat:2-6-2018}
please any one provide java code read the text file and put into map read has key, value pair.