Skip to content

Instantly share code, notes, and snippets.

@ashkrit
Created July 24, 2017 08:09
Show Gist options
  • Select an option

  • Save ashkrit/ab0bdf0733030966d97c2a731617de07 to your computer and use it in GitHub Desktop.

Select an option

Save ashkrit/ab0bdf0733030966d97c2a731617de07 to your computer and use it in GitHub Desktop.
AtomicInteger i = new AtomicInteger();
int total = 0;
for(int x=0;x<300;x++) {
total = i.incrementAndGet();
}
System.out.println("Total Value - " + total);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment