I cannot take whatever piece of Java code I feel like it and run it on Android.
And you weren't meant to.
It's a whole different environment, and they made their own language for it, which they happened to base on Java.
The didn't call it "Java", nor they targeted regular Java deployments (like MS did).
They just wanted to have something that looks familiar to lots of devs, but for THEIR platform.
If MS had done the same (and in fact they sort of did, as early C# was heavily based on Java -- just not as much as Google's) they'd have no issue with SUN. But instead they did those changes while still calling it Java and offering it for Java development on Windows.
(Besides, "I cannot take whatever piece of Java code I feel like it and run it on Android" was also true for SUN's own Java Mobile Edition too, when it comes to the mobile edition's compatibility with the Java SDK's on the desktop/server).
> Android provides a rich application framework that allows you to build innovative apps and games for mobile devices in a Java language environment.
In order to compile for Android, you use JACK, the Java Android Compiler Kit.[2] I could go on. Google uses the name Java all the time in reference to the language used for Android.
Google didn't base a language off Java. Android uses Java-the-language, unmodified (and an outdated one at that). It uses some existing Java APIs as well, and keeps the same names, which is why the official Android API reference[3] has the word Java appearing more times in it than a history of Indonesia.
[1] http://developer.android.com/guide/index.html [2] https://source.android.com/source/jack.html [3] http://developer.android.com/reference/java/lang/package-sum...
But there are tons of differences in other aspects of the issue -- which make all the difference as to the MS case.