Category: Java

The Java programming language and standard library features.

2

Scala access modifiers and qualifiers in detail

Just like Java and other object-oriented programming languages, Scala has access modifiers to restrict access to members of classes, traits, objects and packages. Scala’s access modifiers are slightly different than Java’s; in this post I explain the difference. Besides modifiers, Scala also has qualifiers which allow more fine-grained access control....

4

7 Scala features that surprise Java developers

When you know Java, it isn’t that hard to start programming in Scala. Everything you know about object-oriented programming in Java also applies to Scala. Ofcourse Scala is not just Java with a less verbose syntax; it also has a number of features that Java lacks, such as functional programming...

Campania_Ravello1_tango7174 0

Scala as a better Java

This one is for the Java developers who are curious about Scala. Maybe you have briefly looked at Scala and you were deterred by what at first sight looked like ugly syntax with strange, incomprehensible operators, or you think you have to become a functional programming wizard to understand it....

Gylfe_stood_boldly_before_Odin_by_George_Wright 0

Project Valhalla – Generic Specialization

Last week I wrote about value types, which are one of the new language features that are being investigated for a future version of Java. This time I’ll explain another possible new language feature being investigated in Project Valhalla: generic specialization. In Java, you can only use reference types as...

Walhall by Emil Doepler 8

Project Valhalla – Value Types

In July last year, Brian Goetz announced Project Valhalla, an experimental project to explore major new language features for a future version of Java. Features to be investigated are: Value types Generic specialization Enhanced volatiles Possibly other related topics, such as reified generics The features in Project Valhalla are not...

CompletableFuture 0

The Future is Completable in Java 8

As I mentioned in my previous post, interface Future in Java up to version 7 has a serious limitation, and that is that it’s not possible to get notified when the result is available. The only thing you can do with a Future is call get() on it, which will block if...

ARS_guava 0

Listen to the Future with Google Guava

Futures are one of the many concepts that are useful for building scalable software. A future is an object that acts as a placeholder for the result of some operation that has yet to be performed. This is useful for asynchronous, non-blocking programming, which is what you want to do...