r/java • • Jul 30 '21

What is the future of Java?

I'm not asking like is java going to die or will Java be relevant in future. I'm just curious to know about the future of java. What are the upcoming things coming in java that can change the future of it.

173 Upvotes

123 comments sorted by

View all comments

9

u/[deleted] Jul 30 '21 edited Jul 30 '21

Over the years, some features in C/C++ programming became abused by the programmers. Although the language allows it, it was known as bad practice. So the creators of Java have disabled them:

  1. Use of Pointers

  2. Operator overloading

  3. Multiple inheritances

  4. Access another object’s private members

  5. Restrictions of explicit type casting (related to memory management)

Look at the StackOverflow developer survey

https://insights.stackoverflow.com/survey/2020#technology-programming-scripting-and-markup-languages-professional-developers

JS, Python, and Java are some of the most lovable software languages.

I've been coding Java professionally for over 10 years and I am a Full Stack expert in Java, Spring boot, cloud... JS, TS, React, etc... But I still love to code Java than other languages.

The official language for Android development in Java. Large parts of Android are written in Java and its APIs are designed to be called primarily from Java.

Kotlin is designed to interoperate fully with Java.

Java takes 40.2% of usage by companies around the world. This is from Google Statistics 2021.

This is current stats - https://pypl.github.io/PYPL.html

7

u/TheMode911 Jul 30 '21

Access another object’s private members

Isn't it already possible with reflection, preventing the JVM from doing some optimisations?

Use of Pointers

Instead we have references everywhere, and a multi-year project (Valhalla) attempting to fix it

Ps: your link is about popular languages, not lovable ones (see the "Dreaded" section)

As much complaints I have about Java, I still do not see myself using something else

4

u/spectrumero Jul 30 '21

You can now prevent illegal reflective access to private members.