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 do you mean by compiler?
Can an anonymous class be declared as implementing an interface and extending a class in java programming?
How to use arraylist in java netbeans?
What is the relationship between class and object?
Can two objects have same hashcode?
How does varargs work in java?
You can create a string object as string str = “abc”; why cant a button object be created as button bt = “abc”;? Explain
What if constructor is protected in java?
Explain Basics of OOP Language in java
make a method which any number and any type of argument and print sum of that arguments.....
What is nextint java?
What do you mean by constructor?
what is the significance of listiterator in java?
Can we make constructors static?
How transient variable is different from volatile variable?