what is difference between abstraction and interface?
Answer Posted / kavitha
Abstract classes define methods and interfaces declare
methods.
Interfaces declare methods without implementation.
Abstract classes are very much useful when there is a same
functionality across various classes.
Interfaces are useful for classes which varies in
functionality and with the same method signature.
| Is This Answer Correct ? | 12 Yes | 0 No |
Post New Answer View All Answers
Can we define package statement after import statement in java?
what is meant by Byte code concept in Java?
Why is string class considered immutable?
What is primitive data type in java?
What is yield () in java?
What is an object class?
Which number is denoted by leading 0x or 0x in java?
How do you remove spaces in java?
What is the purpose of the enableevents() method in java programming?
Find the value of a specified element of the array arr[i] where 0 <= i <= n-1
What type of variable is gender?
What is the use of bufferedreader?
Write a program to solve producer consumer problem in java?
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 does yield method of the thread class do?