How does Android's Java version relate to a Java SE version?

JavaAndroidVersion

Java Problem Overview


I am constantly wondering how the Java version used for Android development relates to a Java SE version. For example, I was reading today about "Type Inference and Generic Methods" which is a feature added in Java SE 7. I wonder to myself, "Can I use this in Android code?"

Of course I could type the code into an Android project and see if it compiles, but I'd be happier to have some kind of mapping in my head.

I've tried Googling for this info, checking the Android docs, etc, but can't find an answer.

Edit: I'm more interested in language features, e.g. how does the Android Java syntax version relate to Java SE syntax.

Java Solutions


Solution 1 - Java

Android's version doesn't directly relate to Java SE, although it uses a subset of Apache Harmony's SE 6 libraries and tools. It will be up to the Android team to decide if & when to support/require the SE 7 version of Harmony.

Edit It looks like as of KitKat Android supports Java SE 7 language features. See the comments below.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionjfritz42View Question on Stackoverflow
Solution 1 - Javapents90View Answer on Stackoverflow