Unit 1: Primitive Types
Showing 20 of 23 questions
What is the value of result after the following code executes?
What is the output of the following code?
What is the value of x after the following code executes?
What is the output of the following code?
What is the output of the following code?
What is the value of b after the following code executes?
What is the output of the following code?
What is the output of the following code?
What is the output of the following code?
What is the output of the following code?
What is the result of 7 / 2 in Java when both operands are ints?
What does the expression 17 % 5 evaluate to in Java?
What is the value of (int) 9.7 in Java?
What is the value of x after: int x = 5; x += 3; x *= 2;
What is the output?\nint a = 5;\nSystem.out.println(a++);
What is the result of: double d = 5 / 2;
What happens if you add 1 to Integer.MAX_VALUE in Java?
What is the result of: 5 + 3.0?
What is the output of the following code segment? \nint a = 11;\nint b = 4;\ndouble c = a / b;\nint d = a % b;\nSystem.out.println(c + " " + d);
Consider the following code segment. \nint x = 7;\nint y = 3;\nint z = x-- + ++y;\nSystem.out.println(x + " " + y + " " + z);
Advertisement