import java.util.* ; /** Complete the given class InputTester, which 1) reads an integer into variable i 2) prints the value read 3) reads a double into variable x 4) prints the value read 5) reads a word into variable word 6) prints the word read 7) reads the rest of the words into variable line 8) prints the string read 9) prints the result of (i/i) + (x/x) */ public class InputTester { public static void main(String[] args) { Scanner scanner = new Scanner("5 3.1415 Hello World 19 more words") ; //----------------------Start here. Do not remove this comment. // todo: 1) reads an integer into variable i // approximate lines of code required: 1 int i = scanner.nextInt(); //----------------------End here. Do not remove this comment. System.out.println("Integer read: " + i) ; //----------------------Start here. Do not remove this comment. // todo: 3) reads a double into variable x // approximate lines of code required: 1 double x = scanner.nextDouble(); //----------------------End here. Do not remove this comment. System.out.println("Double read: " + x) ; //----------------------Start here. Do not remove this comment. // todo: 5) reads a word into variable word // approximate lines of code required: 1 String word = scanner.nextLine(); //----------------------End here. Do not remove this comment. System.out.println("Word read: " + word) ; //----------------------Start here. Do not remove this comment. // todo: 7) reads the rest of the words into variable line // approximate lines of code required: 1 String line = scanner.next(); <-----------System said this line error //----------------------End here. Do not remove this comment. System.out.println("Line read: " + line) ; System.out.println("i/i + x/x = " + (i/i + x/x)) ; } }
When it's run the windows will shows line 73 error- -"
Please help...