NEW
Font size
WorksheetsJava Quiz - 1
Total questions: 15
Worksheet time: 9mins
JDK, JRE and JVM are __________
platform-dependent
platform-independent
public class Program{
public static void main(String[] args) {
System.out.println(null);
}
}
null
compilation error
runtime error
public class Quiz{
public static void main(String[] args) {
System.out.println((Object)null);
System.out.println((String)null);
}
}
null
null
null
Runtime error
Compilation error
Given the following code, which expression displays the word "Equal"?
s1==s2
s1.matchCase(s2)
s1.equalsIgnoreCase(s2)
s1.equals(s2)
Predict the output ?
Compilation error
abc
411
Runtime error
JVM allocates default values for Instance variables?
true
false
Is it necessary to create objects to access local variables?
Yes
No
Can local variables be used without initialization?
Yes
No
What's the output of the following code?
0
1
else
compilation error
What's the output of the following code?
10
30
31
What's the output of the following code?
default
4
Compilation error
What's the output of the following code?
true
false
ABC
false
ABC
true
ABC
What is the output of the following code?
jZvZquizsAa
javvquizsAa
javaquizsAa
What is the output of the following code?
Compilation error
no ouput
hi
What is the output of the following code?
Compilation error
no output
hi
