Computer Applications
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.
Java Library Classes
2 Likes
Answer
Variable count will be initialised with value 12.
Reason — The given statement initialises the variable count with the integer value 12.
Answered By
3 Likes
Related Questions
The value returned by Integer.parseInt("-321") is …………… .
- -321
- 321
- 321.0
- "321"
Name the method that can convert a string into its integer equivalent.
- Integer.parseInteger()
- Integer.getInt()
- Integer.parseInt()
- Integer.readInt()
In which package is the wrapper class Integer available?
- java.io
- java.util
- java.awt
- java.lang
What are the library classes in Java? What is their use?