explain the concept of inheritance with an example?
Answer Posted / kkr
Inheritance is the process of creating the classes from existing classes by using 'extends' key word.
It is like IS-A relationship between the classes.
eg : Parent and child relationship. we cal parent class as super class and child class will be subclass.i.e the subclass will have all the members of super class.
Adv : Reusability of the code.i.e productivity will be increase.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What differences exist between iterator and listiterator?
What state does a thread enter when it terminates its processing in java programming?
which one is more efficient int x; 1. if(x==null) 2.if(null==x) state which one either 1 or 2?
What do you mean by garbage collection used in java?
How are java objects passed to a method and what are native methods?
What is the use of singleton class?
Can memory leak happen java?
What does string mean in java?
what is singleton class in java?
Explain what do you mean by functional overloading in java?
How do you call a reference in java?
Can java inner class be static?
How do you square a number in java?
What is math exp in java?
Q1.A. Write note on “The class path Environment Variable”? B. Which are different kinds of source code? Q2.A. How to create an interface? B. Why convert an applet to an application? Q3.A. How to use Media tracker Class. B. How to use string tokenizer class. Q4 A. Explain the overview of UDP messaging. B. Difference between SQL Exception class and SQL Warning class. Q5. A. How to create com object in Java? B. Write short notes on “The properties class” Q6. A. When object is created and destroyed? B. Explain the JDB in depth & command line. C. Write short notes on Web Sites.