Register now or log in to join your professional community.
Android is not only OS its a stack mechine, We use java as a programming language for creating android application..
Why Java?
Android runs on many different hardware platforms. You would need to compile and optimize your native code for each of these different platforms to see any real benefits.
There are a large number of developers already proficient in Java.
Java has huge open source support, with many libraries and tools available to make developers life easier.
Java protects you from many of the problems inherent in native code, like memory leaks, bad pointer usage, etc.
Java allows them to create sandbox applications, and create a better security model so that one bad App can't take down your entire OS.
Android apps can be developed using java,C,C++,C#(XAMARIN),html(PhoneGap) ,python etc.Then why JAVA when Android OS has a linux kernel which is developed using c and C++?JAVA is the most popular language in computer science, we have a lot of developer using java more than any other computer language.That is what Android team just wanted for the initial push of the OS.More developer means more apps, more apps means more publicity, so the best option was JAVA and they preferred it.
Because java is native language for android development by using sdk
you can look at this article i think it gives some background details::
http://www.zdnet.com/blog/btl/trial-android-chief-on-why-java-was-picked-for-android/75179
java is a known language, developers know it and don't have to learn it
its harder to shoot yourself with java than with c, c++ code since it has no pointer arithmetic
it runs in a vm, so no need to recompile it for every phone out there and easy to secure
large number of developement tools for java (see first)
several mobile phones already used java me, so java was known in the industry
the speed difference is not an issue for most applications, if it was you should code in assembly