资讯

Sealed classes in Java let developers limit the creation and use of subclasses and preserve the class hierarchy. Here is how sealed classes in Java work.
Every Java class inherits from Object, so familiarity with this superclass is fundamental to understanding the Java class hierarchy. Also see my Java tip introducing composition vs. inheritance.