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:
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?
Also, if there's any difference in the speed/performance between using different compilers, JDKs and optimizations, how faster/better is it?
Any comparisons would be helpful.