An interface in Java contains abstract and non-abstract methods. Given below are two statements…
Assertion: An interface in Java contains abstract and non-abstract methods.
Reason: All methods in an interface must be implemented by any class that extends this interface.
Given below are two statements marked, Assertion and Reason. Read the two statements carefully and choose the correct option.
- (a)Both Assertion and Reason are true and Reason is the correct explanation for Assertion.
- (b)Both Assertion and Reason are true but Reason is not the correct explanation for Assertion.
- (c)Assertion is true and Reason is false.
- (d)Both Assertion and Reason are false.
Answer
Answer
AIWritten by AI (antigravity) - it can contain mistakes.
Correct option: (d)
Answer: (d) Both Assertion and Reason are false.
In standard ISC Java curriculum, an interface contains only abstract method declarations (non-abstract methods belong to abstract classes). Furthermore, a class implements an interface (using the 'implements' keyword), it does not extend it. Hence, both Assertion and Reason are false.
From ISC 2026 Computer Science Paper 1, question 1(vi).