Search:

Type: Posts; User: JavaPF

Search: Search took 0.08 seconds.

  1. Replies
    7
    Views
    4,058

    Re: Can scanner read the specified line?

    Glad I could help.

    May be worth taking a look at - http://www.javaprogrammingforums.com/java-code-snippets-tutorials/339-how-read-file-line-line-using-scanner-class.html
  2. Replies
    7
    Views
    4,058

    Re: Can scanner read the specified line?

    You could possibly do something like this. As an example, it will take in user input and print out the 10th line.


    import java.util.Scanner;

    public class ScannerTest {

    /**
    *...
  3. Replies
    7
    Views
    4,058

    Re: Can scanner read the specified line?

    Hello ice,

    The problem with the Scanner is, as soon as the user presses enter, it takes that as the input.
    There isn't a way to move to the next line without pressing enter.

    This is assuming...
Results 1 to 3 of 3