Hi can u pls tell me what is the use of marker interface.
Iknow what is marker interface but what ability will the
object get by implementing this.
Answer Posted / sudheer
The interfaces with no defined methods act like markers. They just tell the compiler that the objects of the classes
implementing the interfaces with no defined methods need to be treated differently.
Example Serializable, clonable etc.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Why singleton pattern is better than creating singleton class with static instance?
What is a databasemetadata?
Can a top level class be private or protected?
why Java does not support multiple inheritances?
Why we cannot override static method?
What are the important features of Java 9 release?
Explain oops concepts in detail?
What is a methodologist?
What is a list in java?
Can we use a switch statement with strings?
How to convert string to byte array and vice versa?
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.
Explain a few methods of overloading best practices in java?
How does linkedhashmap work in java?
How many types of equations are there?