M
Q. 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; } }
No solution found for this question.
Add Solution and get +2 points.
You must be Logged in to update hint/solution
Be the first to start discuss.
Q. How many finally blocks can there be in a try/catch structure?
Q. What is the output of the Java program with IF-ELSE statements?
Q. Which one of the following is not ID generating strategy using @GeneratedValue annotation?
Q. ______ must be the first statement executed inside a subclass Constructor.
Q. Which version of Java did start supporting String as the input data type of a SWITCH?
Q. What is the output of the Java code snippet?
Q. __________ is used for initialize the value to the String object.
Q. In Java, can a method declare both "throws" and "throw" statements?
Q. What is the data type of output of any Comparison Operation in Java?
Discusssion
Login to discuss.