where u use Abstraction and Interface in real time

Answer Posted / praveen

If a user want to interact with my application he need an
interface. With the interface the user can access the
specific methods of a class that implemented the interface.
For example user want to call a method. He already know the
specific class implemented that interface, then he can call
the method through reference object.

Abstract class is used whenever a user restricted to
inheritance but not taking instance of a class or if any
methods are there that should be implement by the user.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain serialization and deserialization in java?

775


Is map sorted in java?

813


What is the destroy method?

814


What is the difference between error and an exception?

770


Explain the use of sublass in a java program?

771


Write a program to search a number in the given list of numbers.

827


What is arrays sort in java?

752


Explain OOPs concept.

833


Which is faster call by value or call by reference?

706


How do you trim a space in java?

718


What are the three parts of a lambda expression?

741


What is the difference between replace and replace all?

703


Can a class extend more than one class?

840


What are register variables what are the advantages?

682


Explain about OOPS concepts and fundamentals.

808