0
how to print the sum of 2 variables
hi
7 Answers
+ 3
System.out.println(a+b);
+ 1
varun's answer is correct too vivek
0
thanks vivek
0
si tienes los valores ya dentro de las variables, puedes hacerlo dentro de un System.out.println como de manera rĂĄpida como System.out.println(a+b);
0
int a,b;
int c= a+b;
System.out.println (c);
0
vivek a and b are not strings....so they won't be concatenated..... but they will be added...!!
- 1
nope that will just print a and b separately
do this
int c= a+b;
System.out.println(c);