Android’s Java implementation is currently based on Java 7, while OpenJDK supports the latest version, Java 8 , and should be updated to support all the future versions of Java.
Read moreHow do I get JDK on Ubuntu?
Installing the Default OpenJDK (Java 11)
Read moreIs JDK installed with Android Studio?
A copy of the latest OpenJDK comes bundled with Android Studio 2.2 and higher , and this is the JDK version we recommend you use for your Android projects.
Read more