Answer Posted / sitaram
Inheritance: The base class properties into subclass class
is called inheritance.
Inheritance example:Father and child relation. Father
having 10 lakhs property. That property is always avilable
to child. Father is a parent class. child is a subclass.
Advantage: 1.subclasss take the all properties from parent
class.
2.suppose you can add any property in parent class. That
will be effected to subclasses also.
| Is This Answer Correct ? | 22 Yes | 2 No |
Post New Answer View All Answers
What is volatile keyword in java
define polymorphism in java
Can a source file contain more than one class declaration?
What are the two main uses of volatile in Java?
What is string subsequence method?
How do generics work?
Why is java architectural neutral?
Describe method overriding
Why main function is static?
Difference between string s= new string (); and string s = "abv";?
What is a package in java? List down various advantages of packages.
What is scope & storage allocation of global and extern variables? Explain with an example
What is difference between public static and void?
How do you sort a string in java?
What is string pooling concept?