Answer Posted / vijayakumar chinnasamy
Steps:
1. Create class as final class
2. Make all the properties i.e instance variable as final.
3. Avoid or make the least access for the setter method
for properties.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How do you do a line break in java?
Can I learn java in 3 months?
How static variable work in java?
How to store image in arraylist in java?
What is the properties class in java programming?
What does the three dot emoji mean?
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.
Can a lock be acquired on a class in java programming?
Define linked list and its features with signature?
Which are different kinds of source code?
what is collatration?
How to do a true java ping from windows?
How to do encapsulation in java?
What is a concrete classes? Is Java object class is concrete class?
What invokes a thread's run() method in java programming?