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?

Passionate Archer, Runner, Linux lover and JAVA Geek! That's about everything! Alexius Dionysius Diakogiannis is a Senior Java Solutions Architect and Squad Lead at the European Investment Bank. He has over 20 years of experience in Java/JEE development, with a strong focus on enterprise architecture, security and performance optimization. He is proficient in a wide range of technologies, including Spring, Hibernate and JakartaEE. Alexius is a certified Scrum Master and is passionate about agile development. He is also an experienced trainer and speaker, and has given presentations at a number of conferences and meetups. In his current role, Alexius is responsible for leading a team of developers in the development of mission-critical applications. He is also responsible for designing and implementing the architecture for these applications, focusing on performance optimization and security.