Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Interface OOPS concept

0 Likes
1,282

Interface satisfies which OOPS concepts? A.) Polymorphism, B.) Inheritance, C.) Encapsulation. D.) Abstraction.

I studied Polymorphism & Inheritance will be answer. Anyone can tell me the exact answer what it is?

4 REPLIES 4
Read only

abhawsinghka-1
Explorer
0 Likes
1,240

It is polymorphism. An interface can be implemented in different classes and in each class its methods can be different allowing it to have different forms.

Read only

0 Likes
1,240

What about Abstraction ?

Read only

0 Likes
1,240

In theory, yes. But I have always been conflicted about this. I feel that interfaces do not promote the concept of abstraction by themselves. Cause the argument that is used for interfaces for abstraction could be used for any method in general. Any method implemented promotes the concept of abstraction as the calling program does not have to be concerned about how it is implemented but just the calling parameters.

Read only

0 Likes
1,240

But without Interface you will not be able to create a Factory Class, so you will have a dependency

(this is not totally true, but, without it will be ugly)