NEW
Font size
WorksheetsAPP R1
Total questions: 10
Worksheet time: 3mins
Find the output for the given java code snippet
11
12
14
15
Find the Output for the above code
10 20
50 60
50 20
10 60
Find the Output
Mike
John
Compile Time Error
Run Time Error
10
10.5
Compile-time error: incompatible types
Runtime error: ClassCastException
Find the Output
55
50
60
45
Prints: X is greater than 5
No output
Compile-time error: Misplaced semicolon
Runtime error: NullPointerException
What is the output of a switch statement when no break is used between cases?
The output will be Tuesday only.
The output will be Monday, Tuesday, and Wednesday.
The output will be Tuesday and Wednesday.
The code will fail to compile.
Which of these types are passed by value in Java?
Objects
Primitive types
Arrays
All are passed by reference
What will be printed?
int x = 3;
System.out.println(x << 2);
12
6
1
9
What does this print?
System.out.println(10 + 20 + "30");
Error
3030
102030
3030.0
