I have a question for Jeff, perhaps you would like to comment on. And it is mainly regarding the book "Learn Java for Android Development".
It has always been my understanding that Google has purposefully avoided associating "Android" and "Java" from the inception of Android to try to avoid the mess that they are going through right now with Oracle (SUN). So, now this book is out and it, clearly, embraces the union between the two names. But, at it's core, Android is not java. It uses language syntax that very closely resembles the Java language but the JVM upon which it runs is, truely, not Java but is an Android VM.
How do you reconcile this?
I don't mean to be confrontational! I just would like to start a discussion about this, mainly, to make sure that everyone is clear about the differences between the two.
There isn't much to reconcile. The language syntax is actually identical, and most of the classes that are in Java 5 can also be found in Android. Minus AWT/Swing and some other packages, plus the Android GUI toolkit and some other packages (like Apache HttpClient). So Android is both a subset of Java 5 and a superset of Java 5.
The VM is different - Java class files can not be used directly in Dalvik. Luckily, the Android SDK has a tool that can convert Java class files to Dalvik class files, and that tool works for just about any Java class file. So, with that extra step, Java class files can be used in Dalvik (as long as they don't use other classes that aren't part of the Android class libraries).
Joined: Oct 05, 2010
Oh! I did not realize that ADK provided a conversion tool for .class files! Nice! That's probably more relevant for support libraries than it is for front-end logic. But, still a useful tool. Thanks!