What class modifier(s) can be inserted at line 1 to prevent method() from being overridden (hidden ) without causing compile time errors ?
options are:-
transient
private
default
protected
hiding cannot be prevented
final
As per me there is no overriding in picture, as method is static.. so Answer should be hiding cannot be prevented. but simulator ans is Private Can any buddy explain.. how??/
All I can add that private final is also going to be correct combination to add on line 1. It is not clear from the answer if we should chose one or several. To me this question is also unclear...