What is package protected in java?
No Answer is Posted For this Question
Be the First to Post Answer
What is collection api?
Is vector ordered in java?
When a byte datatype is used?
How to make object serializable in java?
What is an immutable class?
How are the elements of a gridbaglayout organized in java programming?
What are methods of a class?
What is codebase?
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.
How to create an immutable class?
7) Suppose there is Student class like class student { int age; string name; } We want to store these objects in a HashMap. Do we need to override any methods in Student class? If any which ones and why? what if i just override equals or just hashcode? what will be the results in both the cases?
Give a practical example of singleton class usage?