Intermediate Java
Q75 / 100

What is the output of Integer.parseInt("10", 2)?

Correct! Well done.

Incorrect.

The correct answer is C) 2 (binary "10" = 2 in decimal)

C

Correct Answer

2 (binary "10" = 2 in decimal)

Explanation

parseInt(String s, int radix) parses the string in the given base. "10" in base 2 equals 2 in decimal.

Progress
75/100