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



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

Answer / 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

More Engineering AllOther Interview Questions

What is the main difference between binary and counting semaphore?

0 Answers  


can you justify your answer regarding output of following source-code: #include<stdio.h> #include<conio.h> void main() { clrscr(); if(printf("");) { printf("i am able to work in your company :"); } else { printf("your company is not able for having my knowledge :") } getch(); }

1 Answers   Wipro,


Friends Any one tell me the best institute for the telecom protocol course

0 Answers  


how am i supposed to convert a class program in C++ to Matlab? Do i also need to make classes in matlab too or I can do it without making classes???Can somebody help....

0 Answers  


what is difference between class and object in c++

0 Answers   TCS,


I am an Electrical engineering ( electrical back round ) ,can i get hvac Water system design details to easy understand ,i am working past 15years in Pharmaceuticals company with Engineering depart.

0 Answers   Archimedis Healthcare,


What does balanced amplifier consist of?

1 Answers  


what is the difference between oracle 8i vs 9i

0 Answers  


Can you get the name of the data file used as Infile in the control file used for sql loader, and store it in a column of a table if the name of the data files are in a particular fashion and it is getting picked up one by one for loading the data using the command "Infile *"

0 Answers   Infosys,


What is the time complexity T(n) of the nested loops below? For simplicity, you may assume that n is a power of 2. That is, n = 2k for some positive integer k. : i = n; while (i >= 1){ j = i; while (j <= n) { <body of the inner while loop > // Needs &#61553;(1). j = 2 * j; } i = &#61675;i/2&#61691;; } :

2 Answers  


Briefly describe your ideal job?

0 Answers  


Can you connect Active Directory to other 3rd-party Directory Services? Name a few options.

0 Answers  


Categories
  • Civil Engineering Interview Questions Civil Engineering (5086)
  • Mechanical Engineering Interview Questions Mechanical Engineering (4456)
  • Electrical Engineering Interview Questions Electrical Engineering (16639)
  • Electronics Communications Interview Questions Electronics Communications (3918)
  • Chemical Engineering Interview Questions Chemical Engineering (1095)
  • Aeronautical Engineering Interview Questions Aeronautical Engineering (239)
  • Bio Engineering Interview Questions Bio Engineering (96)
  • Metallurgy Interview Questions Metallurgy (361)
  • Industrial Engineering Interview Questions Industrial Engineering (259)
  • Instrumentation Interview Questions Instrumentation (3014)
  • Automobile Engineering Interview Questions Automobile Engineering (332)
  • Mechatronics Engineering Interview Questions Mechatronics Engineering (97)
  • Marine Engineering Interview Questions Marine Engineering (124)
  • Power Plant Engineering Interview Questions Power Plant Engineering (172)
  • Textile Engineering Interview Questions Textile Engineering (575)
  • Production Engineering Interview Questions Production Engineering (25)
  • Satellite Systems Engineering Interview Questions Satellite Systems Engineering (106)
  • Engineering AllOther Interview Questions Engineering AllOther (1379)