Start learning →

Which static method parses a string into an int in Java?

AInteger.toInt()
BInteger.parseInt()
CInteger.value()
DInteger.cast()
Answer & Solution
Correct answer: B. Integer.parseInt()
Integer.parseInt parses a decimal string into a primitive int value.
Practise this question with Quill — ICSE Class 10 →

Keep practising String Handling and Wrapper Classes

Browse all String Handling and Wrapper Classes questions for ICSE Class 10, or explore more Computer Applications topics.

Start a String Handling and Wrapper Classes lesson →