Advertisements
Advertisements
Question
The interface in Java is a mechanism to achieve ______.
Options
encapsulation
overriding
polymorphism
abstraction
MCQ
Fill in the Blanks
Advertisements
Solution
The interface in Java is a mechanism to achieve abstraction.
Explanation:
In the Java programming language, an interface is defined as. An abstract type defines the behavior of a class. In Java, it is used for abstraction and multiple inheritance. In Java, interfaces serve as a tool for abstraction.
shaalaa.com
Is there an error in this question or solution?
2021-2022 (March) Official Board Paper
