Created
August 25, 2013 09:49
-
-
Save tarrsalah/6333038 to your computer and use it in GitHub Desktop.
Fuck the jvm.
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 SOExample { | |
| private int state = 0; | |
| public int getAndIncrement() { | |
| return state++; | |
| } | |
| public int getAndIncrementAnother(SOExample dle) { | |
| return dle.getAndIncrement() + dle.getAndIncrementAnother(this); | |
| } | |
| public static void main(String[] args) { | |
| (new SOExample()).getAndIncrementAnother(new SOExample()); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment