Computer Applications
Name the method that can convert a string into its integer equivalent.
- Integer.parseInteger()
- Integer.getInt()
- Integer.parseInt()
- Integer.readInt()
Java Library Classes
7 Likes
Answer
Integer.parseInt()
Reason — Integer.parseInt() method parses the String argument as a signed integer.
Answered By
3 Likes
Related Questions
The return type of the toLowerCase() method is …………… .
- int
- boolean
- char
- String
The value returned by Integer.parseInt("-321") is …………… .
- -321
- 321
- 321.0
- "321"
What will be the result when the following statement is executed?
int count = new Integer(12);- Variable count will be initialised with value 12.
- Variable count will be initialised with default value of int, i.e., zero (0).
- An array count will be initialised with 12 elements, all having a default value of zero (0).
- Value of count will be unknown as no value has been assigned yet.
In which package is the wrapper class Integer available?
- java.io
- java.util
- java.awt
- java.lang