Home > OS >  Which Java version is the fastest on and is supported by Android?
Which Java version is the fastest on and is supported by Android?

Time:05-07

I heard that Java is becoming faster on newer versions of Android that it's almost as fast as C , and the performance depends on the type of code/operations. Is this true? If it is, which Java version is the fastest on Android and is supported for Android development?

I currently probably have Java 11; it said so when I entered java --version into CMD:

java 11.0.11 2021-04-20 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.11 9-LTS-194)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.11 9-LTS-194, mixed mode)

But, I got this when I opened the "About Java" app:

enter image description here

I wouldn't want to simply install different Java versions and change Android Studio's settings.

Would the upgrade be worth it, and is it different from Java 8/11 in how it builds/syntax/features? Would changing the Java/JDK version affect the Gradle/other build tools' versions or the minimum Android version a device would need to run my apps? Any comparisons would be helpful.

CodePudding user response:

I heard that Java is becoming faster on newer versions of Android that it's almost as fast as C ,

The Java platform has had performance around that of C for a couple decades. Sometimes faster, due to the dynamic runtime optimizations made by HotSpot or OpenJ9.

  • Related