Advertisements
Advertisements
Question
Given:
Integer gw = new Integer (27);
The name of the object is
Options
27
gw
GW
Gw
MCQ
Advertisements
Solution
gw
Explanation:
In Java, the name of the object is the variable identifier used to reference it. Java is strictly case-sensitive, meaning the name must match the exact lowercase declaration gw. The value it stores is 27, while GW and Gw are incorrect variations due to capitalization.
shaalaa.com
Is there an error in this question or solution?
Chapter 5: Library Classes - Exercises [Page 134]
