I find the question in some sites like “ow would you prevent someone from overriding the java.lang.Object class?” but none of the response I could understand.
As per my thinking , it may be done –
Can create a Base class and all the methods of Object class can be
overriden and then we can throw some unsupported exception for each
method , so further all subclasses won;t be able to access any of the
methods of Object or there is much more better way to do it.
Make a
FinalObject extends Objectclass that overrides each of the Object methods and makes themfinal.