Single Choice Not Set

QDetermine Output:
class MyClass{
      static final int a = 20;

      static final void call(){
            System.out.println("two");
      }
	
      static{
            System.out.println("one");
      }
}

public class Test{
      public static void main(String args[]){
            System.out.println(MyClass.a);
      }
}

ID: #2118 Declaration and Access Control in Java 674 views
Question Info
#2118Q ID
Not SetDifficulty
Declaration and Access Control in JavaTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A one
  • B one two
  • C one two 20
  • D one 20
Correct Answer

Explanation

one 20

Share This Question

Challenge a friend or share with your study group.

Related MCQ Questions