- 1
What is the output of the following code?
package javaapplication; public static void main(String[ ] args) { String name = "David"; int age = 25; int y = 12; int result = age / y; int num1 = 8; int num2 = 4; num2 += num1; double score = 12.3; char you = 'z'; System.out.println(num2); } }
4 Respuestas
+ 2
You're only printing out num2 += num1 which is 4+8
+ 1
12
+ 1
Jibrilla Abdul-Razak You can check in Sololearn playground.
0
Ok...thanks