why we need abstract class in java, what is the diff b/w
abstract claas in c++ and abstract class in java
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 |
is the meter head is same as back pressure?
am a textile eng. frombut with major of my course including chemical eng, subjects, can i too apply to the co.?
If any kind of accident happen without any information to any one .what kind of action we have to take
reverse a number ( like 1234 into 4321) using malloc in C programming
hello sir,pls fdorward previous group-I exam papers .....
is java supprot the complier time pollymorphism or run time pollymorphism ... why
What do u mean constructor in java ?
give me some knowledge about automation on which asked on interview
Please mail me the sample papers of PNB for the post Dy. Manager.
Explain how a TP Monitor manages memory and processor resources more effectively than a typical operating system.
why unix commands simpler rather than complex task
How many VLANs are supported on a single switch