+ 1

Sum the two variable and output the answer

Sum the two variable .int x= 2; int y=4; int result =x+y; system.out.println (result);

3rd Mar 2018, 4:34 PM
jaydem
jaydem - avatar
2 Réponses
+ 11
S will be in capital of System , only error
3rd Mar 2018, 4:49 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 2
Yeah.. this should be the code class Program { public static void main(String args[]) { int x=2,y=4,result; result=x+y; System.out.println(result); } }
3rd Mar 2018, 5:51 PM
Aaron Stone
Aaron Stone - avatar