Computer Applications

Assertion (A): Integer class can be used in the program without calling a package.

Reason (R): It belongs to the default package java.lang.

  1. Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of Assertion (A)
  2. Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of Assertion(A)
  3. Assertion (A) is true and Reason (R) is false
  4. Assertion (A) is false and Reason (R) is true

Java Library Classes

ICSE Sp 2025

3 Likes

Answer

Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of Assertion (A)

Reason — The Integer class can indeed be used in a program without explicitly importing any package. This is because it is part of the java.lang package, which is automatically imported in every Java program by default.

Answered By

2 Likes


Related Questions