0
0
Javaprogramming~15 mins

Parsing numeric arguments in Java - Interactive Code Practice

Choose your learning style8 modes available
ads_clickPractice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete 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
AparseDouble
BtoString
CvalueOf
DparseInt
Attempts:
3 left
2fill in blank
medium

Complete 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
AvalueOf
BparseInt
CparseDouble
DtoString
Attempts:
3 left
3fill in blank
hard

Fix 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
AparseDouble
BparseInt
CtoString
DvalueOf
Attempts:
3 left
4fill in blank
hard

Fill 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
Api
BparseDouble
CvalueOf
Dradius
Attempts:
3 left
5fill in blank
hard

Fill 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
Anumber
BparseInt
Cprintln
Dprint
Attempts:
3 left