1) Which of the following option leads to the portability and security of Java?
- Bytecode is executed by JVM
- The applet makes the Java code secure and portable
- Use of exception handling
- Dynamic binding between objects
2) Which of the following is not a Java features?
- Dynamic
- Architecture Neutral
- Use of pointers
- Object-oriented
3) What will be the output of the following program?
public class MyFirst {
public static void main(String[] args) {
MyFirst obj = new MyFirst(n);
}
static int a = 10;
static int n;
int b = 5;
int c;
public MyFirst(int m) {
System.out.println(a + ", " + b + ", " + c + ", " + n + ", " + m);
}
// Instance Block
{
b = 30;
n = 20;
}
// Static Block
static
{
a = 60;
}
}
- 10, 5, 0, 20, 0
- 10, 30, 20
- 60, 5, 0, 20
- 60, 30, 0, 20, 0
4) _____ is used to find and fix bugs in the Java programs.
- JDK
- JVM
- JRE
- JDB