Search:

Type: Posts; User: mariostg

Search: Search took 0.08 seconds.

  1. Re: Reading data from a file into parallel arrays

    Of course, because for each loop turn, you still read two lines... Do you see the TWO calls to nextLine()
    Remove one of them as shown below and see what happens it might help you understand.

    ...
  2. Re: Reading data from a file into parallel arrays

    It is not the number of lines in your file being scanned that drives the number of loops. It's the conditions in the for loops. Well unless you have a break condition in the loops.
    If the...
  3. Re: Reading data from a file into parallel arrays

    char characs = input.nextLine().charAt(0); //This read a line
    String syms = input.nextLine(); //This reads another line

    Given your input format, I would read a line, then split it in two using...
Results 1 to 3 of 3