Java is one of the most popular programming languages in the world. Many big Companies like Google, Amazon are using java for back end services and infrastructure. But despite its huge popularity, Java’s reputation among programmers is something of a mixed type. Some seem to like but others hate it.
I have used Java for more than decade now. I find it an awesome language. Obviously, it is not perfect but has more pros than cons.
Following are some of the things I think Java got right:
Object Oriented Language
Java has huge learning curve but once you are comfortable with it, you will be able to solve problems with minimum time and maximum quality.
Java is purely Object-oriented language. You can write code around objects and their interaction. For example, let’s you are creating library management system, you’ll most likely write code objects representing books, members, staff but also more abstract concepts such as loan and book issue.
This seems to be a fair way, instead of big step by step algorithm, you can think of Java as a set of interacting object. If you design your system right, it will be very easy to maintain and extend the code.
Obviously, Java did not invent the idea of Object Oriented Programming. In fact, OOP concepts are quite old back to late ’60s, but the Java language creators did a great job executing the Object Oriented Programming idea in the language in such a style that it is productive and productive for the programmer.
The Java Virtual Machine
One of Java’s most beneficial features is the Java Virtual Machine (or JVM). The JVM essentially works as the translator between Java code and the underlying operating system on which you are running java code.
Java depicts “write once, run anywhere”. Without the JVM, you’d have to compile your code for each operating system separately. the JVM ensures that Java code runs in same way on Linux, Mac or Windows.
Automatic Memory Management
If you ever practiced a language such as C or C++ then you might be closely familiar with the meticulous effort involved in manually managing memory allocation in your programs. and designers of the Java Programming Language chose to automate memory management.
In Java, you can create objects as per requirements and need not to worry about garbage collection as Java will automatically restore the memory once objects are not being utilized in the program.
Great Programming API
Another important reason to love Java is that it’s a very rich API. It gives everything you need to write a successful program whether it is input-output handling, XML/CSV parsing, socket communication, mail API, etc.
Moreover, there are lot and lot of Java open-source libraries like Spring framework, Spring boot, etc. that provides quite a good amount of functionalities.
If you’re coming from a programming background in C/C++ or VB to Java, it would be a delightful surprise for you to see so much functionality that is properly planned and executed.
According to Wikipedia, there are more than 9 million Java developers around the world. This is a large benefit because for just about every problem you face into as a developer there is a high chance that someone, somewhere had already solved a variety of this problem or same kind of problem. If you search for any problem on web, you are very likely to get solution for the problem.
Fantastic Frameworks & Libraries
Java has good amount of frameworks and libraries to choose from,
Java has an enormous array of frameworks and libraries to choose from. My favorite framework is the Spring Framework which had become the most famous java framework for any sort of work involving web (HTTP) technologies as it helps us to reduce the amount of work required to write the code.
For example: Spring JDBC helps you to remove a lot of boilerplate code which you need to use with conventional Java JDBC.
Here is a good Spring tutorial to learn spring quickly and in effective way.
Java is among the most demanded programming skill in the world. Many big companies such as google/Amazon because of its performance and availability of open source libraries. If you are core java developer/Programmer, you can get a lot of opportunities in many good companies.
There are many good languages to choose from out there. Java is just one of them. This article is in no way trying to declare that “Java is the best” or that “Java is better than X language” but it demonstrates why you should learn java in 2019.