2 ms·
That's interesting. As far as I remember, it's not possible to use any Java 7 language features while compiling to class files compatible with the 1.6 JRE with
by lxgr 13y ago
That's interesting. As far as I remember, it's not possible to use any Java 7 language features while compiling to class files compatible with the 1.6 JRE with "regular" Java. (See e.g. http://stackoverflow.com/questions/17168184/java-7-language-backwards-compatibility http://stackoverflow.com/questions/17168184/java-7-language-...)
- lnanek2 13y agoThe title of the section is using Java 7 source compatibility, so I don't think it is about compiling to be compatible with 1.6, it's compiling to be compatible with 7. Realistically, Android code doesn't get run on a JVM anyway, so the whole thing is kind of silly. If their translation to DEX byte code supports only 1.6 class files, then it supports only 1.6, but clearly it supports 7 now.
- eropple 13y agoTry-with-resources requires library compatibility. All other Java 7 features can be expressed using Java 6 bytecode structures, so it doesn't surprise me that they're allowing them in pre-KitKat projects.