KnowledgeBoat Logo
|

Computer Applications

What will be the result when the following statement is executed?
int count = new Integer(12);

  1. Variable count will be initialised with value 12.
  2. Variable count will be initialised with default value of int, i.e., zero (0).
  3. An array count will be initialised with 12 elements, all having a default value of zero (0).
  4. 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