Sail E0 Webinar
Question
What is the output for the below code ?
public class A{
static{
System.out.println("static");
}
{
System.out.println("block");
}
public A(){
System.out.println("A");
}
public static void main(String[] args){
A a = new A();
}
}
Options:
A .  A block static
B .  static block A
C .  static A
D .  A
E .  None of these
Answer: Option B

Submit Your Solution Below and Earn Points !
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

More Questions on This Topic :


Latest Videos

Latest Test Papers