Answer Posted / divyesh chauhan
yes java do not support multiple inheritance but we can achieve multiple inheritance using concept of interface implementation in class
for e:g
interface my
{
public void show();
}
interface my1 extends my
{
void disp();
}
class child implements my1
{
public void show()
{
System.out.println("hello java");
}
public void disp()
{
System.out.println("hello disp");
}
public static void main(String...a)
{
my m1=new child();
m1.disp();
m1.show();
}
}
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the use of math abs in java?
What do you mean by synchronized non access modifier?
Is arraylist an object in java?
how we can use debug in myeclipse 6.0 in order solve the problems that exist in our program when there are 900 to 1000 pages in a web application
What is the purpose of extern variable?
What are the concepts of 'OOPS'?
What methodology can be employed to locate substrings inside a string?
What are recursive functions?
Is java platform independent?
what is recursion in java
Difference between serialization and deserialization in java?
What is the difference between the paint() and repaint() methods?
In how many ways we can create threads in java?
What is flush buffer?
What are the 7 types of characters?