difference between Abstract and Interface?
Answer Posted / ravi raj
Abstract Class:
---------------
1.abstract class contain the abstract and non-abstract methods
2.abstract class contain static and non-static variables
3.through abstract class we can get 0-50% abstraction in java
4. if any class declared as a abstract i.e abstract class
5. we wont create instance for this class.
6. we cont make final for this class.
Interface :
-----------
1. Interface contains only abstracted methods.
2. it allows only static and final variables.
3. interface is by default abstracted and public.
4. through interface we get 100% abstraction.
5. we can solve the multiple threading in interface.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Explain about thread synchronization inside a monitor?
What is ripple effect?
Can I run seam outside of jboss as?
Can I run seam with jdk 1.4 and earlier?
What is a class loader? What are the different class loaders used by jvm?
Difference between new operator and class.forname().newinstance()?
how to use debug in my elipse to solve problems that exist in my project
What is the difference between java class and bean?
Define prototype?
Is a class a subclass of itself?
What classes of exceptions may be caught by a catch clause?
Can I import same package/class twice? Will the jvm load the package twice at runtime?
How to determine SGA site?
the same information whether it will connect to the database or it will be used previous information?
How many times may an objects finalize() method be invoked by the garbage collector?