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 abstract method with example?

Answer Posted / vikram

Hi Gopal, well I will explain u abstract methods in
layman's language. Sometimes, we want a method to perform
different functionalities. for eg. if suppose we have a
method dat finds d the area of geometric figures. Now every
geometric figure has different formula for calculating the
area. In dat case we go for abstract methods. where we just
declare a method by any name, in our case let it be "area
()". Now we can construct the body of this method depending
upon the type of geometric figure and the formula required
to find its area, seperately for all geopmetric figures.
But we will use the same name "area()" for all the methods
dat we define below to find the areas. I hope u got a vague
picture of abstract methods.

Is This Answer Correct ?    26 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When parseint method can be used?

987


Which collection is ordered in java?

1032


What do you mean by exception handling in Java?

1366


Howto get an object that will perform date & time calculations then format it for output in some different locales with different date style.can ne1 tel me the answer of this question.pls

1972


Can final class have constructor?

971


Explain the private protected method modifier?

1029


Can I declare a class as private?

1127


How to create an immutable class?

1171


What is difference between core java and java ee?

950


What is the default size of arraylist in java?

1197


Is 0 an even number?

1029


Do I need to import java.lang package any time? Why?

1456


What is arraylist e in java?

1112


What is the statements?

1148


What is the difference between comparison done by equals method and == operator?

1063