Advertisement

06.12.2008 at 08:48PM PDT, ID: 23481725
[x]
Attachment Details

Need to loop through a text file and load data into an array

Asked by monica73174 in Java Programming Language, New to Java Programming

Tags: Java

I have a text file that I need to loop through and put the data into 2 seperate arrays.
For instance the data will look like this..
Mary Jones 16
How can I tell when I reach the end of the file.

This is what I have so far, I know its not much but Im still pretty new to Java.

Scanner inFile = new Scanner(new FileReader("Player.txt"));Start Free Trial
[+][-]06.12.2008 at 09:12PM PDT, ID: 21775964

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Java Programming Language, New to Java Programming
Tags: Java
Sign Up Now!
Solution Provided By: objects
Participating Experts: 1
Solution Grade: A
 
 
[+][-]06.12.2008 at 09:13PM PDT, ID: 21775965

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628