Difference between Abstract Class & Interface?
Answer Posted / rakesh.fanu
Abstract Class :-
Abstract class should be declare with abstract.
Abstract Class must be extended by its sub class.
Abstract Class has abstract method and also method with
body also.
Abstract Class has not instance variables , it contain only
Constant.
An abstract class cannot be instantiated
Interface :-
Interface must be Implemented by another class.
Interface has only abstract method.
Interface has not instance variables , it contain only Constant.
An Interface cannot be instantiated
| Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
What is jpa project?
Is java built on c?
What is war file in java?
What is lambda expressions action func and predicate?
What is proxy object in java?
What is static class in java?
What is connection pooling in java?
How do you check if java is installed on windows command prompt?
What is mq in java?
What is dto layer in java?
Write a class which checks whether a given number is prime or not. Write another class to implement the behavior of previous class and print the series of twin prime number upto a given range.
Why bean class is used in java?
In a barber shop there are 2 doors. customer come in 1 door, leave in other. minimum # of chairs. barber spend his life in cutting. always barber can cut 1 customer. few chairs in the shop. if barber busy customer waits, if chairs full, customer leave. if no customer, barber sleeps. treat barber and customer as 2 threads. you can use Semaphore class with arrive and depart and count as parameter.
Are there tuples in java?
What is the java api?