Answer Posted / priyabrata patro
inheritance , name only mentions here that inherit.Listen inherit means it can be occupied by another one like father properties go to his sons, observer some automobiles you can get inheritance meaning there only ,like hero honda passion and passion plus , so , there are a lot of instance available which are related to inheritance.
So, inheritance is nothing but ,in programming language, occupying the properties of one class by another class.
for instance
public class Idemo{
public staic void m(){}
public void m1(){}
}
public class Idemo1 extends Idemo
{
public static void main(String args[]){
Idemo1 i=new Idemo1();
i.m();
i.m1();
}
}
but here it can not be called as inheritance
interface I{void fun1()}
interface I1
{void fun();}
interface I2 extends I,I1
{}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the purpose of javac exe?
What programs use java?
What is the gregoriancalendar class in java programming?
What is the default value of an object reference declared as an instance variable?
What is the difference between math floor and math round?
how to deploy tomcatserver to weblogic server? write d following steps?
How do you convert an int to a string in java?
What are user defined exceptions?
Can an interface extend a class?
Where is java located?
Why do we need strings in java?
Can private method static?
What is substring 1 in java?
Is empty .java file name a valid source file name?
What is an example of a keyword?