6 Reasons Why You Should Try Java!

13 Andrew Willis

At Gravytrain we’ve being using Java for over 10 years now. It powers “Quote and Buy” and lead generation insurance platforms for our customers as well as other internal applications for us. For anything that there isn’t an off the shelf solution for it’s the go to programming language of choice. Why? Let us tell you!

1. Java is one of the most popular programming languages

Java usually ranks at, or near to, the top of the TIOBE Index and was the top language of 2015 according to IEEE Spectrum. Being one of the most popular languages means that it is used a lot. Oracle, the owners and maintainers of Java, estimate that over 3 billion devices run it in some form.

Some reasons to explain this are that it’s open source, has a large community of users who can participate in developing technical standards and boasts a vast amount of documentation. There is also training and certification available. It’s also over 20 years old now so you can rest assured that it will not be obsolete anytime soon.

2. It’s an enterprise level language

You see that Android phone over there – guess what runs most of its applications? Most of LinkedIn uses it. Google use it for a lot of their products as part of their Google Web Toolkit offering which they developed and is now an open source project.

3. It has an extensive array of libraries you can use

Aside from the core libraries, which offer a lot of functionality out of the box, there are a vast amount of open and closed source libraries out there which can be used to speed up development time using battle tested code that you can rely on. Hardly any of our work will not include something from at least Apache Commons, Spring or Hibernate because they’re so useful.

Aside from libraries that you can use in your code it also has a variety of excellent tools, such as Eclipse & Maven, that can be used to help you develop your applications.

4. Write once, run anywhere

Well, anywhere that has the Java platform installed on it.

The key idea here is that once you’ve written and compiled your code you will be able to deploy it onto any Java enabled environment, which is one that has the Java Virtual Machine (JVM) installed on it. The JVM executes your code and shields you from the need to deal with differences that can arise from running on different operating systems.

In practice this means that you can write and compile your application on Windows or Mac and then run it on a Linux server in a production environment with no changes or recompilation required.

5. Other languages can use the JVM (if they want to)

When you compile a Java application you get something called bytecode, which is the portable code that executes on the JVM to allow your application to “run anywhere”.

One handy feature of doing this is that anything else that can be compiled into bytecode can run on the JVM as well. Examples of other languages using the JVM are Scala, Groovy & JRuby (an implementation of Ruby) as well as JavaScript using Oracle’s new Nashhorn engine which arrived in Java 8.

This can be handy if you want to use features of another language not available in Java or if you want to be able to interact with the Java APIs while still using the language of your choice.

6. Evolution

The last major release, Java 8, brought with it features to allow Java to behave like a functional language in certain areas, through Lambdas, streams and being able to pass methods/ functions by reference. These simplify a lot of common tasks and increase the readability of code.

The new date-time API solved long standing issues that resulted from working with the previous date-time classes and the new Optional class help resolves problems with the pesky “NullPointerException”.

Scheduled in for Java 9 is a system for better modularity and a command line tool amongst other things.

Basically, Java is awesome.

Creating an application is a lot easier than with a lot of other languages thanks to its vast array of powerful features and libraries maintained by its community. If you want to do something a bit different then it’s definitely worth considering.

Do you require advice on how to improve your website? Contact our solutions team to find out more about our web development services 020 3813 5351.