English

Identify the true statement. (a) Integer value = new value (65); (b) Integer int = new Integer (65); (c) Int val = new int(64); (d) Integer val = new Integer(64);

Advertisements
Advertisements

Question

Identify the true statement.

Options

  • Integer value = new value (65);

  • nteger int = new Integer (65);

  • Int val = new int(64);

  • Integer val = new Integer(64);

MCQ
Advertisements

Solution

Integer val = new Integer(64);

Explanation:

Integer is a wrapper class in Java, and an object of Integer can be created using the new keyword with an integer value.

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. (x) | Page 134
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×