final classes

Figure 483. final classes Slide presentation Create comment in forum
public final class Shape { ... }

-------------------------
public class Rectangle
  extends Shape { // Error: final class cannot be extended
...

Figure 484. final classes, rationale Slide presentation Create comment in forum
  • Design decision.

  • Slight performance gain.

Note

Prominent Example: java.lang.String.