Skip to content

Instantly share code, notes, and snippets.

@polyglotpiglet
Created June 26, 2016 16:14
Show Gist options
  • Select an option

  • Save polyglotpiglet/56e48d7fd5d865edbb3b6cb57a14fd20 to your computer and use it in GitHub Desktop.

Select an option

Save polyglotpiglet/56e48d7fd5d865edbb3b6cb57a14fd20 to your computer and use it in GitHub Desktop.
public static void main(String... args) {
int count = 0;
for (int i = 0; i<100000; i++) {
count += wrapper();
}
System.out.println(count);
}
private static int wrapper() {
return doubleMe(2) + doubleMe(4);
}
private static int doubleMe(int x) {
return 2*x;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment