Home / DeveloperSection / Interviews / What is static block?
You haven’t finished your post yet. Are you sure you want to leave and discard your draft?
Can you answer this question?
Anonymous User
class A2{ static{System.out.println("static block is invoked");} public static void main(String args[]){ System.out.println("Hello main"); } }
Output:static block is invoked Hello main
You have need login or register for voting of answers or question.
Anonymous User
27-Mar-2015