TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
TIOBE - Java Coding Standard
Search

Rule:  Finalizer5Checked automatically with code checker

Synopsis:If you override finalize(), make it protected
Language:Java
Severity Level:2
Category:Finalizer


Description:
If you override finalize(), make it protected. If you make it public, other classes may call it.
public class Foo {
 public void finalize() {
  // do something
 }
}