Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is the difference between abstract class and
Interface?where we can use it in realtime projects?

Answer Posted / nitesh

1)We define an Interface in the Java application with a
set of abstract methods without any implementation. Which
means all the methods of an interface are by default
abstract methods and public methods.
2)Once an Interface is defined in the application then any
class can implement that interface, in such case the class
must be implemented with all the mehtods of the respective
Interface otherwise the class will become as abstract class.
3)A class can implement any no. of interfaces, in such case
the class must be implimented with all the methods of those
interfaces otherwise the class will become as abstract class

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are encapsulation, inheritance and polymorphism?

941


Can an arraylist be empty?

1002


Differece between class and generic class?

974


Can you call one constructor from another if a class has multiple constructors?

968


Where is jre installed?

982


What is defined as false sharing in the context of multithreading?

981


Which class should you use to obtain design information about an object in java programming?

1034


What is the advantage of preparedstatement over statement?

1045


What are the main differences between the java platform and other platforms?

992


What is methods in java?

955


How do you clear a list in java?

1039


What is meant by tab pans?

1130


What is loop in java?

927


How large is a boolean?

948


When a thread is executing synchronized methods , then is it possible to execute other synchronized methods simultaneously by other threads?

997