Answer Posted / al rahid
1. Declare the Class as final (this inherently makes all
member function final)
2. Declare member variables private (not necessarily final,
because private instance variable are accessed via public
member functions only, e.g. in java.lang.String class,
variable "hash" is declared as "private int hash;" with no
final keyword).
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is jee6?
How do you bind variables?
A person says that he compiled a java class successfully without even having a main method in it? Is it possible?
Write a method that will remove given character from the string?
What is java Applet?
What is google full form?
What about features of local inner class?
What are thread groups?
Is singleton thread safe in java?
What is the Scope of Static Variable?
What are the parts of methodology?
What are peerless components?
How many bits is a char?
Are static members inherited to sub classes?
Where is the find and replace?