What is the result? Given the code fragment What is the result? Given the code fragment What is the result? A. – 6 B. – 4 C. – 5 D. 5 E. 4 F. Compilation fails Explanation: Show Hint ← Previous question Next question →
Roger int var1 = 5; int var2 = var1–; int var3 = 0; if(var2 < 0) { var3 = var2++; } else { var3 = –var2; } System.out.println("var3: " + var3); E is correct Reply
C
prezent na Dzien Dziecka
http://www.XquielQMVW.com/XquielQMVW
c
tested
int var1 = 5;
int var2 = var1–;
int var3 = 0;
if(var2 < 0) {
var3 = var2++;
} else {
var3 = –var2;
}
System.out.println("var3: " + var3);
E is correct