
when will we use abstraction or interface

Hi Friend,
Interface: Through interface we get the multiple inheritance in java.And we implement interfaces to override the abstract methods it contains.
Abstract class: We also use abstract classes to override the abstract methods that it contains.Otherwise the child class will mentioned as abstract.
If we wants to prevent a class from instantiation then we mentioned it as abstract.
Thanks
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.