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
In which language eclipse is developed?
What is lambda used for?
Why serialization is used in java?
What is a stream in programming?
What is a dao 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.
What if the main method is declared as private?
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.
Spring framework ---Can somebody explain me in easily understandable format about AOP, IOC and DI, so that i can explain in interview rather than just telling what is available in net. I am not able to understand that also. I am new to Spring
Do I really have to type in the programs in the book to try them out?
How do I enable java in firefox?
Is java singleton thread safe?
What is explicit casting?
Does jvm maintain a cache by itself? Does the jvm allocate objects in heap? Is this the os heap or the heap maintained by the jvm? Why
What is javacpl?