It’s the start of 2016, which means that we’ve now finished the “20 Years of Java” celebrations. Actually, although the announcement about Java (and the HotJava browser, which did not enjoy quite the same success) was made publicly on May 23rd, 1995, the first official release of the JDK was on January 23rd, 1996. You could justifiably claim that Java is only now turning twenty. There have been numerous retrospectives on Java, but I thought what would be interesting to look at is the success of Java in its twentieth year.

It’s difficult to accurately measure the popularity of programming languages, but one of the generally accepted surveys is the TIOBE index. This tracks language references through a variety of search engines as well as Google Blogs, Wikipedia and even YouTube. (In writing this entry I learnt something new, which is that TIOBE is actually an acronym for “The Importance Of Being Ernest,” the play by Oscar Wilde. Not sure what that has to do with programming languages, but there you go.).

Looking back at the results over the last fifteen years Java has consistently been either number one or two. Java has jostled for position with C, which was consistently the most popular before Java was launched (how things change: back in 1986 Lisp was number two and Ada was number three). TIOBE have also just announced that Java is their “Programming Language of the Year” for 2015. A great achievement, especially as it was also given the award ten years ago.

As another measure of popularity, Oracle frequently likes to quote the statistic that there are nine million Java developers in the world. If you want a chuckle check out this JAXenter article, which gives some details of how they got to this number. Regardless of the details I think we can all agree there are literally millions of Java developers around the world.

The question to ask is why does Java continue to be so popular? I think there are a number of reasons for this; let’s just highlight four:

1. Practicality

James Gosling has described Java as a “blue collar” programming language. It was designed to allow developers to get their job done with the minimum of fuss, whilst still enabling developers to pick up someone else’s (or even their own) code at a later date and understand what it’s supposed to do. Sure, you can write unreadable code in Java, just as you can in any language, but with good coding conventions it is more readable than many other languages.

2. Backwards compatibility

Sun and subsequently Oracle have made huge efforts to ensure that code written for one version of Java will continue to run unchanged on newer versions. Although this hasn’t always been the case (assertions in Java SE 1.4, enumerations in Java SE 5) and it has sometimes led to implementations that could have been better without compatibility (generics) it is a very compelling feature for developers. There’s nothing worse than taking code that works and having to change it to make it work on a newer version of the platform. That’s just wasted time.

3. Scalability/Performance/Reliability

With over twenty years and thousands of man-years of development, Java is a rock-solid platform that performs on a level that can match or even exceed that of native code (thanks to some of the optimisations made by the JVM using dynamic rather than static code analysis). When it comes to scalability, just look at some of the large enterprises using Java: Twitter (who moved off Ruby-on-Rails to the JVM because RoR wouldn’t scale), Spotify, Facebook, Salesforce, eBay and, of course, Oracle. Hadoop, Cassandra and Spark, the basis of most big data projects, are either written in Java or Scala and run on the JVM. If you want scalability and performance, Java and the JVM is an obvious choice.

4. Freshness

To me this is the big one. Looking at the TIOBE graph there is a significant upswing in Java popularity since October 2014, which is shortly after the launch of JDK 8. JDK 8 was a big change for developers using Java because of the introduction of Lambda expressions and the streams API. Suddenly Java developers could do things in a more functional way without having to learn a whole new language like Scala. These features also make it potentially much simpler to take advantage of multi-core/multi-processor machines without having to write lots of complex and potentially error prone multi-threaded code. With project Jigsaw scheduled for delivery in JDK 9 we’ll see modularity make big enterprise applications much easier to build, deploy and maintain. There are already plans for new language features, like value types, in JDK 10.

I look forward to seeing Java being awarded Programming Language of the Year in another ten years’ time.