Create input file for voter details containing data as (Sr. No, Name, DOB, Voter Id, Aadhar No, Ward NO)
Calculate age & according to age store details in respective file. Create 3 file one will store data under 18. Second file will store data from age 18 to 22 and third file will store data of age above 22 (Use Filter to create separate file)
Take Input file name as runtime parameter.
I have created the input file for voter details
How to calculate age and accordingly how to store in respective file, file 1 will store data below 18 while file 2 will store date from 18 to 22 while file three will store data of age 22 and above.