Read From a File Exercise

do not need to turn in

Create a file called data.txt that contains the Names and ages of 3 people. It looks like:
Name 1
Age 1
Name 2
Age 2
Name 3
Age 3


Write the java code that reads in the data and stores it in a Names and Ages arrays and finally prints out the information to the screen. Hint: You can do multiple ways...try using FileReader and BufferedReader classes!
Solution