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 .  Runtime Exception
C .  5
D .  0
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