Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This noncompliant code example generates a StackOverflowError as a result of infinite recursion. This exhausts the available stack space and may result in a denial of service.

Code Block
bgColor#FFcccc
public class StackOverflow {
  public static void main(String[] args) {
    infiniteRun();
    System.out.println("Continuing...");
  }
    
  private static void infiniteRun() {
    infiniteRun();
  }
}

...