Posts Tagged: jdk8

Java Map and Subtleties of getOrDefault vs computeIfAbsent

Posted by & filed under , .

I wrote recently about the new niceties in the Map interface that Java 8 brought to light where I’m highlighting in particular 2 new methods: getOrDefault and computeIfAbsent (see my previous post here about it). These provide a cleaner (and as it turns out faster too!) way of retrieving values from a Map instance. However, […]

JAX London Logo

Of Java Streams … Again!

Posted by & filed under .

I just went again through this JAX London write-up (read more here: http://www.infoq.com/news/2015/10/jax-london-2015-round-up) and thought it was worth some more thoughts from me. As you might recall, I have touched before on the subject of Java 8 streams in this blog post back in Sep/2014. The thing that puzzled me back then was the fact […]

Find in Array — Java 8 Style

Posted by & filed under , , .

Java 8 has added support for parallel processing arrays — as I’m sure most of you know. There are lots of official release documents from Oracle talking about how employing these parallel methods and classes improves speed of your application — and as to be expected, there are lots of bloggers who set off to […]

Tracking Users Online — Part 2

Posted by & filed under , .

First release of this project on Github is now out there. And as promised in my “pilot” post of this series, this post will walk you through what went into this release and why. The project itself as you recall is available on Github in this repository: https://github.com/liviutudor/PixelServer. The version for this release is pixelserver-1.0.0 […]

Java 8 Accumulators and Adders

Posted by & filed under , , , .

If you’ve been using Java for a while now, then like me, you must have saluted the move quite a while back in JDK 1.5 to introduce the atomic classes (AtomicLong, AtomicBoolean and so on). They were a big step forward, away from the clunkyness of having to create ridiculous bottlenecks in the code for […]

java code

Parallel Sorting in Java 8

Posted by & filed under , , .

I started playing with Java 8 relatively recently (booo! 🙂 ) — and going through the new features this JDK brought, I keep discovering things which I feel deserve more attention than they have been given. Sure, everyone is raving about the lambda expressions, try-with-resources and so on, but occasionally there are small additions that […]