Modificador final de Java en el método

public class Shape {
  private int numberOfVertices;
  
  //with final modifier,
  //this method cannot be overridden by subclasses
  public final int getNumberOfVertices() {
    return numberOfVertices;
  }
}
King DeDeDe