KnowledgeBoat Logo
|

Computer Applications

Assertion (A): In Java, when you declare a class, it displays a sample program for the user.

Reason (R): You cannot write a Java program without the use of a sample program.

Based on the above discussion, choose an appropriate statement from the options given below:

  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 Intro

8 Likes

Answer

Assertion (A) is true and Reason (R) is false.

Reason — In Java, when we declare a class, it automatically displays a sample program for the user. However, we can write a Java program without the need for a sample program. A sample program is often used for guidance, but it is not mandatory for writing Java programs.

Answered By

4 Likes


Related Questions