Complete the code to convert the string "123" to an integer using a wrapper method.
int number = Integer.[1]("123");
The method parseInt converts a string to a primitive int.
Complete the code to convert the integer 456 to a string using a wrapper method.
String text = Integer.[1](456);
The method valueOf converts an int to a String.
Fix the error in the code to convert the string "true" to a boolean value.
boolean flag = Boolean.[1]("true");
The method parseBoolean converts a string to a primitive boolean.
Fill both blanks to create a Double object from a string and get its primitive double value.
Double d = new Double("3.14"); double value = d.[1](); // get primitive boolean check = Double.[2]("3.14") > 3.0;
doubleValue() gets the primitive double from the Double object.parseDouble() converts a string to a primitive double.
Fill all three blanks to convert a string to an Integer object, get its int value, and convert it back to string.
Integer obj = Integer.[1]("789"); int num = obj.[2](); String str = Integer.[3](num);
valueOf converts string to Integer object.intValue gets primitive int from Integer.toString converts int to string.
