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

why we need abstract class in java, what is the diff b/w
abstract claas in c++ and abstract class in java

Answer Posted / nikhil naoghare

Abstact classses are those classes which can have abstact as well as Common methods. we use Abstract classes because we want to implement Polymorphism.
Its always good to prefer the abstract class because it will give us the addtional method declaration in the class.
We use Abstract class to enforce some rules to the classes which extends it. For example we can define a class say Car and we can declare methods say Color() Mileage(). This means whatever the class that is derived from Car has to override or give definition for Color() and Mileage() and therefore we are making sure that all the derived classes follows or has the common functionalities. In other way the classes derived from superclass should have common properties. In addition to this the derive class can have its own methods like Type().

In case of Abstract class we can define COMMON functionalities in super class and those can be used in the derived class where as in Interface we cant do that.

Is This Answer Correct ?    11 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is advantages and disadvantages of vlan?

4250


discuss the technique for implementing high performance computing

1529


i want to know ,If a five-digit number is input through the keyboard, write a program to calculate the sum of its digits.

2220


Write a program to input 10 elements in an array and seperate even and odd numbers, positive and negative between them ?

1744


What is the difference between "type testing" and "product qualification"?

1495


I have applied for the post of Section Engineer. plz anyone send me the previous question paper. i did my engineering in Information Technology.

1971


a book consists of chapter ,chapter consist of sections and sections consists of subsections.construct a tree and print the node.

5434


how much the percentile as a good percentile in elitmus.

6621


sir/medam i had completed my B-TECH(CSE)2011 with 61%.i have to go USA for futhure studies.i dnt know what is steps for do futhure studies in USA so could you please tell me

1973


nohup sort employees > list 2 > error out & what will happen?

3272


I an doing Engineering in IT(4th year). i want to know what is the scope or .NET and Linux, and which is better for carrier

1782


describe what is const pointer and why do we need it?

1960


What is the difference between a gun and a rifle and what advantage does a spinning bullet have?

1326


write program which accept information about 5 student & display same information according to ascending order of their name??

2835


what are the various login options used in loadrunner tool to make a application performance testing

1816