Single Choice
Not Set
QWhat 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();
}
}
ID: #2117
Declaration and Access Control in Java
722 views
Question Info
#2117Q ID
Not SetDifficulty
Declaration and Access Control in JavaTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
static block A
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic