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 |
What's the range of C/A?
How do I unlock my laptop if I forgot my administrator password, a Toshiba running Windows 7?
explain in detail about life cycle of thread
what is LINUX?
Q1. A. Discuss the various types of variables. B. How to control the file? Q2. A. How the image application? B. Write short notes on trees structures work. Q3. A. How to load and unload child forms. B. When should we use recursive programming Q4. A. Write short notes on “The ole control’s shortcut menu” B. How to test the AX stat class Q5. A. How to use advanced data-bound controls. B. Write notes on manipulating the recordset object Q6. A. What is script control? B. How to down load image properties. C. What is meant by building a recordset.
An inversion is an array of numbers is any pair (i,j) such that i<j and A[i]>A[j]. What is the average number of inversions in an array of n distinct numbers? plz GIVE ME SOLUTION
what is the different between view and materialized view in oracle DBA?
out of fgets() and gets()which function is safe to use and why in c language?
. There are two water tanks A and B, A is much smaller than B. While water fills at the rate of 1 liter every hour in A, it gets filled up like, 10, 20, 40,80, 160…..in tank B. (At the end of first hour, B has 10 liters, second hour it has 20 liters and so on). If tank B is 1/32 filled of the 21 hours, what is total duration of hours required to fill it completely?
true and false 1. The jawa source code can be created in a notepad editor. 2. The value of 111% 13 is 3.
Write a program to print Pattern 1) If user enters 3 1 2*3 4*5*6 4*5*6 2*3 1 2) If user enters 4 1 2*3 4*5*6 7*8*9*10 7*8*9*10 4*5*6 2*3 1
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....