Search:

Type: Posts; User: helloworld922

Search: Search took 0.13 seconds.

  1. Replies
    4
    Views
    2,064

    Re: FileReader need assistance

    Just put it inside the the while loop:


    while (reader.hasNext())
    {
    int min = Integer.parseInt(reader.next());
    int max = Integer.parseInt(reader.next());
    for(int x=min ;x <=max;...
  2. Replies
    4
    Views
    2,064

    Re: FileReader need assistance

    the scanner.next() method reads in a "word" (aka, stuff separated by whitespaces).

    So, the first call to next() would return "1", the second one would return "10", the third "20", and so on until...
Results 1 to 2 of 2