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

1

u/SWinxy Jul 30 '21

Could you elaborate on your take on pointers? They’re quite useful for being able to return multiple values when you don’t have tuples in the language.

1

u/khmarbaise Jul 31 '21

Could you elaborate on your take on pointers? They’re quite useful for being able to return multiple values when you don’t have tuples in the language.

In Java you simple give back a class with appropriate members...(usually final etc.) ... Maybe since JDK16 you could use records for that...