Java Quiz no1

Consider the following code

[code language=”java”]

public class JavaApplication4 {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {

String testValue = "1";

try{
  testValue = "2";
return;
}catch(Exception e){

}finally{
testValue = "3";
}

}
}

[/code]

What will be the value of testValue at the end of execution?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.