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
How is treeset implemented in java?
What is the new line character?
What is meant by data hiding/encapsulation?
What is a flag and how does it work?
Can we have two methods in a class with the same name?
What is a jit compiler?
Convert Binary tree to linked list.
What is the purpose of using break in each case of switch statement?
Give me some null interfaces in java?
How many wrapper classes are there in java?
What exactly is methodology?
What is protected access modifier?
How we can execute any code even before main method?
What is externalizable?
What is the purpose of a volatile variable?