Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java stackoverflowerror

public class StackOverflowErrorExample {

  public static void recursivePrint(int num) {
    System.out.println("Number: " + num);
    if (num == 0)
      return;
    else
      recursivePrint(++num);
  }

    public static void main(String[] args) {
      StackOverflowErrorExample.recursivePrint(1);
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #stackoverflowerror
ADD COMMENT
Topic
Name
5+1 =