Created
November 15, 2011 20:15
-
-
Save ellbur/1368188 to your computer and use it in GitHub Desktop.
How deep is your stack?
This file contains hidden or 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
| public class Counter { | |
| public static void main(String[] args) { | |
| foo(0); | |
| } | |
| static int foo(int count) { | |
| count = count + 1; | |
| System.out.println(count); | |
| foo(count); | |
| return count; | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment