truths and myths of java()

 

 


telling the truth and making someone cry is better than telling a lie and making someone smile

If you believe in myths or your collegues who perpetuate them, this article will help you to know the truths.

We are in 2021 and while it has often been given for moribund, or even qualified as new   COBOL(Common Business-Oriented Language )  by some, the Java programming language still remains the uncontested leader of programming languages in the enterprise world. 

   Created in 1995 by James Gosling and Patrick Naughton, the Java programming language has since been a fantastic success that has never been denied. The acquisition by Oracle in 2009 will have raised some doubts about its future, but recent decisions by Larry Ellison’s company to shorten the time between each major version of Java are a step in the right direction. Indeed, they will make it possible to revitalize the JDK and to offer new functionalities at a much faster pace.

In addition, the latest major versions of Java have enabled significant advances for the language and the platform as a whole. Now java 16 general avaibility occurred on 16 March 2021 also in it there is update for timezone database and system updates on 20 April 2021.        JDK 17 is the next long-term support release now under active development ,due out in September 2021,if the current 6 month release cycle continues.Java 17 is expected to be the 2nd long term support release since switching to the new 6 month release candence .

Despite all the progress made by engineers working on the JDK, both in terms of language and JVM, a number of persistent myths remain within Java and its platform. In this article, I suggest you come back to the  biggest and try to debunk them!

1)JAVA is relatively very slow as compared to C applications



  Initially, the java virtual machines were slow and hence, java was slow as compared to C application. However, the speed difference between java and C/C++ languages is now not a major concern due to technologically advanced virtual machines and just-in-time compilers that allows faster loading.

2)Java is better than C++ and more in demand

   While it is true that java is the dominant language in the software industry, the fact cannot be negated that it cannot overcome certain narrow and specific tasks, such as artificial intelligence. Yes, java has phenomenal growth and is more in demand than C++, there is still room for other programming languages. Java is excellent in portability and internet support, but C++ excels in performance and works on various operating systems. So, both have their positives and negatives and professionals with the knowledge of either can make it big in the IT industry.

3)Java is only compatible to web browser

  Java programs can be run like normal programs if you install a JVM. There are many forms of java codes and the most used one is the applet that needs a web browser. The platform supports web-based applications, desktop applications and applets.

4)Java is dead

From 1995 to 2006, the Java language evolved at a relatively fast pace with a new major version every 2 years. The introduction of Generics in Java 5 was a real language shift in 2004. Version 6 of the JDK was released in 2006 with one of the relatively minor modifications. The language will then stagnate for several years. The community is struggling to agree on the most appropriate evolutions for the future of Java. In addition, Oracle’s acquisition of Sun in 2009 does not help the case.


 


 

Some believed that Java had died after the acquisition by Oracle

Many doubts then arise about the future of Java. Some even bet on his death under Oracle’s leadership. Java 7 is finally released in 2011 but with limited features compared to what was expected. Thus, the Jigsaw modularization project was postponed due to the community’s difficulties in finding a solution that was satisfactory to all. For many, Java is then on the way to becoming the new COBOL. It will take another 3 years to see the release of Java 8 with (finally) the integration of major new features for developers. Lambdas and Streams are a real revolution paving the way for functional programming in Java. A breath of fresh air for a Java language that was criticized on all sides in the face of more recent languages with more powerful syntaxes.

Nevertheless, the absence of the JDK modularization project within Java 8 once again disappoints developers. However, it was only a postponed part since the Jigsaw project and the modularization of the JDK are finally integrated into Java with version 9 released in September 2017.

Aware of this major issue for the future of Java, Oracle decided to change its focus from Java 10 released in March 2018. Starting with Java 10, Oracle will release a new major version of the JDK every 6 months. The goal is to release more often new features that make the language evolve in order to make it more dynamic for the community and to prevent some developers from considering that Java is a dead language.

It is finally a success in my opinion because 18 months after this implementation of its new policy, Oracle released Java 13 in September 2019 ,and till now Java 17 is expected to be launch in September 2021.

5)Java has become paid service

In 2018, Oracle announced in a somewhat confusing way that the JDK would now be charged for professional uses in production. Obviously, the confusion has led some to argue that Java has become a paid service! However, this is not the case. It’s another new myth to debunk.

In reality, Oracle now distributes two builds of the JDK:

             Oracle JDK

             Oracle OpenJDK

Oracle JDK is a free development and testing environment but you have to pay to use it in production. It comes with long-term support from Oracle. On the other hand, Oracle OpenJDK is free for any environment.

Thus, Java remains free as long as we use Oracle OpenJDK. In addition, there are other implementations of the JDK that you can choose to use, which ensures that Java is free in the long term. For example, we can use the JDK builds proposed by the AdoptOpenJDK community. More recently, Amazon has just made its own JDK builds available under the name Amazon corretto with completely free long-term support.

In short, Java remains free and it is still a myth that has no reason to exist.

6)Java can’t leak memory

In Java, the memory is managed by a Garbage Collector. Thus, unlike languages such as C or C++, the developer does not have to deal with memory management himself. All this is intended to abstract the developer from this work in order to limit memory leaks. Based on this assumption, many people think that it is not possible to have memory leaks in Java.

It is still a myth that needs to be debunked. Indeed, by never releasing references on objects and variables that are no longer useful, the developer will prevent the Garbage Collector from doing its work properly. This will lead to a slower application and memory problems. In addition, memory leaks are possible if input/output resources are not released or when using native codes via JNI(the Java Native Interface is a foreign function interface programming framework that enables Java code running in a Java virtual machine to call and be called by native applications and libraries written in other languages such as C, C++ and assembly ) in bad ways for example.

In any case, it is important to be aware that a managed memory language like Java does not mean that the developer should not design programs that take into account memory management issues. The developer must take this into account, even if the way of reasoning is not the same as with compiled languages such as C or C++. 

7)Java is not a gaming  programming language

Java uses the same OOP principle utilised by C++ but offers a broader range of systems to play for. Java codes typically run on the Java Virtual Machine (JVM) and translate into generic bytecodes, executable on any system. So, Java is one of those few game programming languages that gives developers the ability to develop games for any given system. It is one of the best programming languages for games.

 Conclusion:

Java remains the most widely used programming language and in fact the leader that all competitors want to dislodge from its pedestal. As such, the myths about Java are therefore persistent. In this article, I presented you the  greatest myths while showing you why they were false.

In conclusion, never forget that Java is here to stay, but that we must always be pragmatic when choosing a technology for a computer project.



Comments

Post a Comment