why java does not support multiple inheritance
Answer Posted / k.mahesh
Java does not support multiple inheritance but this problem is solved through interfaces. Interfaces helps Java to achieve several advantages of multiple inheritances without the associated problems\. We can prevent some variables and methods from being accessed by a subclass by declaring them as private.
Always interface gives a template from which we can develop new classes. Interface gives the design part and implementation of the design we must do. Interface tells what to do, but not now how to do. Java supports multiple inheritance through interfaces so that we can take features of tow interfaces into our implementation file.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Why we use set in java?
What is the difference between method overriding and overloading?
Explain about the security aspect of java?
Define array. Tell me about 2-D array.
Can an arraylist be empty?
What is meant by vector class, dictionary class, hash table class, and property class?
What is Java Annotations?
How do I stop concurrentmodificationexception?
there are N number of matchboxes numbered 1...N.each matchbox contain various number of stick.Two player can alternatevely pick some amount of stick from the higest stick containing box . The player is condidered win if there is no stick after his move.Find the final move so that the move player win. Note:In case the number of stick is equal ,pick the stick from the higest numbered box.
How to create an interface?
Explain the features of java?
What are methods in java?
Write a program to print fibonacci series up to count 10.
Does treeset allow null in java?
What data type is a string?