Skip to content

Instantly share code, notes, and snippets.

@mithuns
Created January 30, 2018 21:47
Show Gist options
  • Save mithuns/e101f9aad59e954dd6766abd94294883 to your computer and use it in GitHub Desktop.
Save mithuns/e101f9aad59e954dd6766abd94294883 to your computer and use it in GitHub Desktop.
int counter = 0;
AtomicInteger counter = new AtomicInteger(0);
fileMap.forEach((k, v) -> {
counter++ //this wont compile
counter.addAndGet(1);
//do something with i
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment