I tried the following code in a main method of a class that I wrote:
public static void main(String[] args){
...
Object s = new Object();
s.finalize();
...
}
However, the eclipse give me a tip that
The method finalize() from the type Object is not visible
I am so confused because the type Object has a protected finalized method, which is supposed to be visible by its own? Am I wrong anyway?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…