1. Which of these can not be used for a variable name in Java?
Answers
1. identifier
2. keyword
✅
3. identifier & keyword
4. none of the mentioned
2. Which of the following best defines a class?
Answers
1. Parent of an object
2. Instance of an object
3. Blueprint of an object
✅
4. Scope of an object
3. Which component is used to compile, debug and execute the java programs?
Answers
1. JRE
2. JIT
3. JDK
✅
4. JVM
4. What will happen?
public class Test {
static {
System.out.println("Static block");
}
public static void main(String[] args) {
System.out.println("Main method");
}
}
Answers