0

What is wrong with my java sacnner input code?

i cant find my mistake....plz tell me. https://code.sololearn.com/cl7vjLPCb1H9/?ref=app

5th Aug 2017, 5:52 PM
Shobh
Shobh - avatar
1 Answer
+ 12
import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner s = new Scanner(System.in); int a = s.nextInt(); int b = s.nextInt(); System.out.println(a+b); } } /* Use an uppercased i (I) while taking an integer input using Scanner. And, you have a extra curly brace which isn't required... */
5th Aug 2017, 5:59 PM
Dev
Dev - avatar