the scanner class as it is used here is for taking input from the standard input which is the keyboard. the hasNext() method of class Scanner is a method that returns true until the end of file...