Latest Tutorials| Questions and Answers|Ask Questions?|Site Map




Have Programming Question? Ask it here!
 
 
 


Amol Khanorkar
importent
1 Answer(s)      3 years and 8 months ago
Posted in : Java Interview Questions


if we hv abstract class then why we use interface?


Advertisement
View Answers

November 29, 2010 at 5:57 PM


Hi Friend,

An Abstract class is similar to an interface. You cannot instantiate them, but you can extend them. Any class that extends the abstract class has to provide the implementation to the abstract methods. Hence these classes can be used as a skeleton to similar classes where some common functionality may be required. Such functionality can also be embedded into these classes. Unlike interfaces, abstract classes can have method code also. So they are very useful.

For more information, visit the following links:

Interface

Abstract class



Related Tutorials/Questions & Answers:
why crieterias are importent in hibernate?
why crieterias are importent in hibernate?  why crieterias are importent in hibernate?   HiberanteTemplate is a class proposed by spring softies, here everything will be ready made to use. that is capsulized
Advertisements
Java - Java Interview Questions
Basic Concept of Java  Need to learn all concept of Java  All topica are importent in Java, but you must be clear on basic concept... about what you have done so far, which is more importent i guess
code protection - Java Beginners
code protection  dear friend Please help me, This is importent for me I want to protect my java class and jar file from decompiler software, I think that what you know what is decompiler; please please help me i want
XML Interviews Question page17,xml Interviews Guide,xml Interviews
; Importent: You should be very careful about placing XML namespace
Advertisements
 

 

 

DMCA.com