Multiple Choice Question

Quiz Guidelines



What will the following program print?

public class TestClass{  
static int someInt = 10;  
public static void changeIt(int a){  
  a = 20;  }  
public static void main(String[] args){   
System.out.println(someInt);  } }

Select 1 option 

A. 10 
B. 20 
C. It will not compile. 
D. It will throw an exception at runtime. 
E. None of the above. 

Q&A Set: