This is about what level of Java language you want to use. KitKat supports full support for Java 7, Gingerbread, and support for Java 6, and earlier versions are Java 5. At least when it comes to the core Java APIs. Approximately the same setting is mentioned here .
You can often use language functions that were added in one version in an older version if the compiler knows how to do this. For example, Diamond Operator was added in Java 7, but you can still use this feature in Java 6, since
List<String> list = new ArrayList<>();
actually compiles into the same thing as
List<String> list = new ArrayList<String>();
done.
The βtry with a resourceβ construct, on the other hand, cannot be compiled into legitimate Java-compatible code and therefore is exclusive to applications that require KitKat and up.
zapl
source share