Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to parse a string into an integer.
Java
int number = Integer.[1]("123");
🎯 Drag options to blanks, or click blank then click option
Attempts:
3 left
2fill in blank
mediumComplete the code to parse a string into a double.
Java
double value = Double.[1]("45.67");
🎯 Drag options to blanks, or click blank then click option
Attempts:
3 left
3fill in blank
hardFix the error in parsing a string to an integer.
Java
int num = Integer.[1]("abc");
🎯 Drag options to blanks, or click blank then click option
Attempts:
3 left
4fill in blank
hardFill both blanks to parse a string to a double and assign it to a variable.
Java
Double [1] = Double.[2]("3.14");
🎯 Drag options to blanks, or click blank then click option
Attempts:
3 left
5fill in blank
hardFill all three blanks to parse an integer from a string and print it.
Java
String str = "42"; int [1] = Integer.[2](str); System.out.[3]([1]);
🎯 Drag options to blanks, or click blank then click option
Attempts:
3 left
