when to for abstract class and when to go for interface
Answer Posted / sumit kumar
if your class design have some common and some different
behavior then go for - abstract class
if your class design have only different behavior then go
for interface.
Is This Answer Correct ? | 12 Yes | 2 No |
Post New Answer View All Answers
How many boolean functions are there?
take an array with -ve and +ve value both.find out the nearest value of 0(zero).if two values are same like(-2 and +2)then extract +2 is nearest of 0(zero).
What is data string?
What are disadvantages of java?
Explain jvm, jre, and jdk?
I am unable to find or learn about print command. I have a graphical program in core java in applet but i want to give print command but i have coding for that so if anyone know about this plz mail me on avdhesh_chauhan007@yahoo.co.in
Is string passed by reference in java?
How list contains works in java?
Why to use nested classes in java?
Can you give names of Container classes?
What is sortedmap interface?
What are the major drawbacks of external iteration?
What is meant by JVM? Is JVM platform independent or not?
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 a get method?