Answer Posted / shivaprasad
Multiple inheritance is not allowed in java because it creates
DIAMOND PROBLEM.
DIAMOND PROBLEM: Suppose classes B and C extend A and
class D extends to both B and C(multiple inheritance). Now,
if D calls a method in A then it does not know from which
class it has to inherit(either B or C). This is called
diamond problem.
Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
what is recursion in java
How do you download stubs from Remote place?
Define inheritance?
Realized?
Give us the name of the list layoutmanagers in java?
What are the differences between wait() and sleep()?
What is a jagged array in java?
Which methods cannot be overridden in java?
Is arraylist ordered?
what is bmg file and how to create that files?what will it contailn?
How to obtain a performance profile of java program
What is == in java?
What is static block?
Is singleton set an interval?
Draw a UML class diagram for the code fragment given below: public class StringApplet extends Applet { private Label sampleString; private Button showTheString; private ButtonHandler bHandler; private FlowLayout layout; public StringApplet() { sampleString = new Label(" "); showTheString = new Button (" Show the String"); bHandler = new ButtonHandler(); layout = new FlowLayout(); showTheString.addActionListener(bHandler); setLayout(layout); add(sampleString); add(showTheString); } class ButtonHandler implements ActionListener { public void actionPerformed(ActionEvent e) { samplestring.setText("Good Morning"); } } } Note: The methods need not be indicated on the diagram.