Core Java Note

  1. Robust
    pointer model that eliminates the possibility of overwriting memory and corrupting data.
    So the compiler can detect problems that in other languages, show up at only runtime.
  2. ActiveX technology relies on digital signatures alone for security.
    Applets take an advantage over ActiveX in security, since it verifies the source of the code, and restricts the visit of program through sandbox.
  3. Architectural-neutral object file format. The compiled bytecode is executable on many processors, given the presence of the Java Runtime System.

    Formally, representations of all fundamental data types (including their sizes) are compiler-dependent and only compiler-dependent. The compiler (or, more properly, the implementation) can serve as an abstraction layer between the program and the machine, completely hiding the machine from the program or distorting it in any way it pleases.


But in practice compilers are designed to generate the most efficient code for given machine and/or OS. In order to achieve that the fundamental data types should have natural representation for the given machine and/or OS. In that sense, these representations are indirectly dependent on the machine and/or OS.

In other words, from the abstract, formal and pedantic point of view the compiler is free to completely ignore the data type representations specific to the machine. But it makes no practical sense. In practice compilers make full use of data type representations provided by the machine.

Still, if some data type is not supported by the machine, the compiler can still provide that data type to the programs by implementing its support at the compiler level (“emulating” it). For example, 64-bit integer types are normally available in 32-bit compilers for 32-bit machines, even though they are not directly supported by the machine. Back in the day the compilers would often provide compiler-level support for floating-point types for machines that were not equipped with floating-point co-processor (and therefore did not support floating-point types directly).

  1. performance: just-in-time compilers are competitive with traditional compilers and in some cases even outperform then, e.g: a just-in-time compiler can monitor which code is executed frequently and optimize that code for speed. A more sophisticated optimization is inlining of functions.
    Moreover, for server-side applications, Java can use multi-threaded mechanism.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值