1~

Minter Coder's Blog

Chapter 2 - Soru 9

2021-03-17

9. What is the result of running this code?
public class Values {
integer a = Integer.valueOf("1");
public static void main(String[] nums) {
integer a = Integer.valueOf("2");
integer b = Integer.valueOf("3");
System.out.println(a + b);
}
}
A. 4
B. 5
C. The code does not compile.
D. The code compiles but throws an exception at runtime.

yukarıdaki integerler gözünüze battıysa zaten cevabı C olarak anlamışsınızıdr :)