ICSE Class 10 Computer Applications Question 13 of 30

Solved 2024 Question Paper ICSE Class 10 Computer Applications — Question 18

Back to all questions
18
Question

Question 1(xviii)

Assertion (A): Static method can access static and instance variables.

Reason (R): Static variable can be accessed only by static method.

  1. Assertion and Reason both are correct.
  2. Assertion is true and Reason is false.
  3. Assertion is false and Reason is true.
  4. Assertion and Reason both are false.
Answer

Assertion and Reason both are false.

Reason — A static method can only access static variables and static methods directly because it belongs to the class, not any specific object. Hence, Assertion is false.
Both instance and static methods can access static variables. Hence, Reason is false.