how an we achive multiple inhetitance in java using
interface..??
Answer Posted / sindhu
In Java Multiple Inheritance can be achieved through use of Interfaces by implementing more than one interfaces in a class.
| Is This Answer Correct ? | 19 Yes | 0 No |
Post New Answer View All Answers
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.
What is the difference between superclass and subclass?
Explain the reason behind ending a program with a system.exit(0)?
How do you add spaces in java?
What do you mean by JVM?
Which class is the superclass for every class in java programming?
How do you delete a list in java?
Does java list allow null?
Explain list interface?
Is it possible to define a method in java class but provide it’s implementation in the code of another language like c?
Tell me a few examples of final classes defined in Java API?
What is a parameter in java?
What is array length in java?
Explain the difference between an Interface and an Abstract class?
What is the this keyword?