0

How print a sum of two numbers

int x=2,y=4; int result = x + y; System.out.println(?);

5th Jun 2019, 10:17 PM
Jo Ker ML
Jo Ker ML - avatar
3 Answers
+ 4
System.out.println(result);
5th Jun 2019, 10:17 PM
Bodan Talev
Bodan Talev - avatar
+ 2
You have three variables: int x = 2; int y = 4; int result = x + y //2 + 4 = 6 System.out.println(result); //output: 6
5th Jun 2019, 11:00 PM
Denise Roßberg
Denise Roßberg - avatar
+ 2
System.out.println(result);
9th Jun 2019, 9:37 AM
CodeFu
CodeFu - avatar