Sail E0 Webinar
Question
What will be the output for the below code?
public class Test{
static{
int a = 5;
}
public static void main(String[] args){
System.out.println(a);
}
}
Options:
A .  Compile with error
B .  5
C .  0
D .  Runtime Exception
E .  None of these
Answer: Option A

Submit Your Solution Below and Earn Points !
Next Question

Submit Solution

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

Latest Videos

Latest Test Papers