Answer Posted / cm
1. Mark the class as 'final' to avoid any
subclassing/overriding
2. Make the fields as 'private' & 'final' to avoid
reassining in any way after creation of the object by
passing params via contructor
| Is This Answer Correct ? | 17 Yes | 3 No |
Post New Answer View All Answers
How variables are stored in memory?
What is a container in a gui?
What does n mean in java?
What is tcp and udp?
What is the internal implementation of set in java?
What are the basic interfaces of java collections framework?
What are constants?
How many bytes is a string java?
What restrictions are placed on method overloading?
Is null a string or object in java?
What is the main method java?
what are Hostile Applets?
What is a copy constructor in java?
What are the differences between throw and throws?
State some advantages of java?