A

Admin • 828.03K Points
Coach

Q. Determine 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);
}
}

  • (A) one
  • (B) one two
  • (C) one two 20
  • (D) one 20
  • Correct Answer - Option(D)
  • Views: 17
  • Filed under category Java
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.