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 happens if constructor is private?

1074


What is method overloading and method overriding?

1110


Explain polymorphism citing an example.

1100


Write a function to print Fibonacci series and Tribonacci series?

1217


What is the difference between synchronized and synchronized block?

1106


Can you write a java class that could be used both as an applet as well as an application?

1000


How many bits are used to represent unicode, ascii, utf-16, and utf-8 characters?

1148


Which category the java thread do fall in?

1047


what is the purpose of "virtual"?

1126


How are variables stored?

1031


What do you mean by of string::valueof expression in java 8?

1004


What is hashmap in java?

1109


What are the two basic ways in which classes that can be run as threads may be defined?

1126


What is an iterator java?

1198


What is meant by method overriding?

1166