Last active
August 29, 2015 14:06
-
-
Save kishaningithub/7273be2ec5deae0c4f47 to your computer and use it in GitHub Desktop.
Java System Stack Limit Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* max sys stack entries | |
My i7 mac - 11909 | |
My office i5 dell pc - 8437 | |
*/ | |
public class StackOverFlowThreshold | |
{ | |
private static int noOfCalls=0; | |
public static void main(String[] args) | |
{ | |
try{ | |
func(); | |
}catch(StackOverflowError e){ | |
System.out.println(noOfCalls); | |
} | |
} | |
private static void func() | |
{ | |
noOfCalls++; | |
func(); | |
} | |
} |
2nd time: 14412
3rd time : 12931
4th time: 13339
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My Office PC : 13237