Android – Why Java Was Chosen for Android Development

androidmobile

Why was Java chosen for Android, instead of something like C++? I have heard that Java uses quite a lot of memory and I would presume that low memory usage would be quite important on mobile devices. Is there any real advantage to using Java instead of a language like C++ on a mobile device?

Best Answer

This article sheds some light on the situation. The most pertinent link within that article is this. So you've got a massive install base with lots of programmers who know the language and it's widely taught at universities. C++ was dropped from my school's curriculum, Java is still here. Java has Java ME which has a massive install base on other cellphones. The Pantec Ease I have in my pocket right now has a little coffee cup in the corner of the screen. Anyone care to guess what that is?

This answer on Stack Overflow covers it pretty well too.

Summary of SO answer:

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 were you should code in assembly

Related Topic