PRASHNIKAप्रश्निका
Back to the paper

State any one purpose of using interfaces in Java programming.

Computer Science20241 markShort answer

Answer

Answer

AI
One purpose of using interfaces in Java is to achieve multiple inheritance of type: since a Java class can extend only one class, it can implement more than one interface to inherit (and be forced to provide implementations for) the abstract behaviour/method signatures declared in each of them.
Inheritance, Interfaces and Polymorphism

From ISC 2024 Specimen Computer Science Paper 1, question 1(viii).