Variables reader and input both contain a Scanner object that uses System.in. This is because the Reader class does not have the next or the nextLine method. Reader class should implement those methods and then main can use input.next() and input.nextLine() and eliminate the reader variable.
Variables reader and input both contain a Scanner object that uses System.in. This is because the Reader class does not have the next or the nextLine method. Reader class should implement those methods and then main can use
input.next()
andinput.nextLine()
and eliminate the reader variable.