Answer Posted / venkata siva reddy
1.Make the class as final.
2.Make all the properties (variables) as private and final
3.Provide only getter methods for variables.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is the difference between error and an exception?
What is java in simple terms?
Write a program to calculate factorial in java?
Which collection allows duplicate values in java?
Can you pass by reference in java?
What does n mean in java?
Is null a string in java?
Why Set interface contains unique elements, what internally implemented for this so that it contains unique elements?
How many arguments can be passed to main ()?
Which way a developer should use for creating thread, i.e. Sub classing thread or implementing runnable.
What is a functional interface?
What is the meaning of flag day?
Why are getters and setters used?
What are JVM.JRE, J2EE, JNI?
What is compareto?