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...

when,where and how to use abstract class and interface

Answer Posted / prapanch

if the developer wants some methods which are implemented
in the super class and some methods which will be
implementd by him then he will go for abstract class.
because in abstact class all methods need not to be abstact
in nature. but in interface all the methods must be
abstract and so the developer will not get any implemented
code from the interface. you will use interfaces when two
different teams are working for a same requirement then an
interface will act like a medium with which they can
interact and all the teams will be in line.so your team and
other team will implement the same method names but with
difffeerent implementation code.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an example of a conditional statement?

995


What are methods of a class?

985


What does %d do in java?

994


What things should be kept in mind while creating your own exceptions in java?

1106


What about main() method in java ?

983


What is lifetime variable?

917


Why does the integer quotient -0/3 yield 0, but the double quotient -0.0/3.0 yields – 0.0?

996


How many types of string data types are there?

1037


How do you create a method in java?

960


What methodology can be utilized to link to a database?

913


Explain garbage collection in java?

932


explain different ways of using thread? : Java thread

972


What are the restrictions that are applied to the java static methods?

945


Can I extend singleton class in java?

1051


What is the final blank variable?

1078