final classes

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

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

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

  • Slight performance gain.

Note

Prominent Example: java.lang.String.