English

Given: Integer gw = new Integer (27); The name of the object is

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]

APPEARS IN

Rupa Pandit Computer Applications [English] Class 10 ICSE
Chapter 5 Library Classes
Exercises | Q 1. (viii) | Page 134
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×