Java - Wrapper Classes
Identify the error in the following code snippet:
String s = "456"; int n = Integer.valueOf(s); System.out.println(n);
String s = "456"; int n = Integer.valueOf(s); System.out.println(n);
valueOf returns an Integer object.Integer to int, so the code compiles and runs, printing 456.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions