where u use Abstraction and Interface in real time
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / teja
When ever there is need of having same common features
among the subclasses of of super class we have to go for
AbstractClass,
When ever there is no common features for subclasses of
super class we have to go for interface
| Is This Answer Correct ? | 1 Yes | 0 No |
What is supplier in java?
How many inner classes can a class have?
What do you understand by access specifiers in Java?
Which is the class in java?
can u override the start() method of Thread class
How variables are stored in memory?
Is java 11 paid version?
What is toarray method in java?
Can we add two byte variables and assign the result to a byte variable ? b=b1+b2 where b,b1,b2 are byte types
How do you represent a space in regex java?
Define immutable object?
What is the use of using enum to declare a constant?