java final modifier on method

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

Also in Java: