+ 1

I can't find the problem in my code.

Hello. I was practicing and testing uses of java.util.scanner and I wrote this code but it doesn't compile. I checked pretty much everything and I cant see the problem. Please enlighten me. (Sorry if my mistake is just a dumb typo. I just cant notice them) Scanner scan = new Scanner (System.in); // scanner 101: (Name of the scanner) scan = new Scanner (What you want to scan. System.in for input) int Input; Input = scan.nextInt(); System.out.println("Next number."); int Input_2; Input_2 = scan.nextInt(); int result = Input *= Input_2; this code doesn't compile> System.out.println(" " + Input + " + " + Input_2 " = " + result);

9th Jul 2017, 12:38 PM
MassiveMayhem
0 odpowiedzi