Before we get into the great Java Champion content I'd like to say thank you to our Java Champions for their contributions to the community. Here are a few JC posts from this week a bit early since tomorrow and Friday are a holiday : ).
The theme for this week looks to be Devoxx and Women in Technology.
Java Champions led and were featured in this years Devoxx Belgium closing keynote watch here.
Trisha Gee, latest blog post - What Can Men Do - So, I wrote a long email to the London Java Community in answer to an excellent question: “What can men do to support Women in Technology?”. It’s a bit of a brain dump, by no means comprehensive, and is in answer to a specific question in a specific context, but I’ve been asked to make the information public so it can be useful in a broader context. So here it is.
Every Friday we will post the latest and greatest articles, blog pots etc. from Java Champions. Enjoy!
Dr Heinz M. Kabutz Contribution -
java.util.Optional - Short Tutorial By Example - Abstract: Java 8 introduced the java.util.Optional class, based on the famous Guava class by the same name. It was said that we should hardly ever call get(). In this newsletter we offer a short tutorial that demonstrates coding examples of alternatives to get().
Sorting Lists - Abstract: List has a new method sort(Comparator). This is handy, as it allows implementations to specialize how to sort their internal data structures. Vector only synchronizes once per list, not once per element. ArrayList avoids copying the array unnecessarily. CopyOnWriteArrayList works.
Concurrency Puzzle - System.arraycopy() - Abstract: "Friends don't let friends write low-level concurrency by themselves."
Concurrency Puzzle Helpful Hints - Abstract: In the previous newsletter, we sent out a threading puzzle for you to solve. Here are some hints to help you figure out what is going on.
Concurrency Puzzle Explained, Solved With StampedLock - Most programmers had a blind spot with the statement "arr[size++] = e;" We somehow think that size will be updated after the assignment. In this newsletter we look at this basic concurrency bug and also present a solution in the form of the Java 8 StampedLock.