Java - Wrapper Classes
Identify the error in the following code snippet:
Integer x = null; int y = x + 5; System.out.println(y);
Integer x = null; int y = x + 5; System.out.println(y);
x is null, so autounboxing to int causes error.NullPointerException at runtime.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions