为什么Android的使用Java? [英] Why does Android use Java?

查看:143
本文介绍了为什么Android的使用Java?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

确定,这确实应该被要求有人从谷歌,但我只是希望其他意见。

OK, this should really be asked to someone from Google, but I just want other opinions.

即使Android的原生支持code的应用,主要开发工具就是Java。但为什么?我的意思是,是不是在移动设备上速度太慢,除preT code?当引入升级Froyo,谷歌表示,新的JIT编译器可以实现2-5倍的速度的应用程序。这意味着,使用Java本机上code是2-X倍慢。

Even Android supports Native code applications, the main development tool is Java. But why? I mean, isn't it too slow to interpret code on a mobile device? When introducing Froyo, Google said that new JIT compiler can achieve 2-5 times faster applications. This means, that using Java over native code is 2-x times slower.

是的,我知道,使用管理code应用程序是在系统稳定性方面更安全,因为虚拟机有更好的控制程序,不过,这种性能下降是巨大的,我看不出任何一点,为什么使用它。

Yes, I know that using managed code applications is safer in terms of system stability, since virtual machine has better control of program, but still, this performance drop is huge, and I don't see any point why to use it.

推荐答案

的几点:

  1. Java是一种已知的语言,开发人员知道它并没有去学

  1. Java is a known language, developers know it and don't have to learn it

这是很难拍摄自己与Java比用C / C ++ code,因为它没有指针运算

it's 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

大量的Java开发工具(见点1)

large number of development tools for Java (see point 1)

几款手机已经使用Java ME的,所以Java是闻名于业界

several mobile phones already used Java ME, so Java was known in the industry

的速度差不是问题对于大多数应用;如果这是你应该code低层次的语言

the speed difference is not an issue for most applications; if it was you should code in low-level language

这篇关于为什么Android的使用Java?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆