Java details from Java Core Technology Volume 1 basics (1)

Source: Internet
Author: User

Java is a platform which includes language, virtual machine, instant compiling, class library and execution environment.

Implementation of the environment to provide security, cross-operating system portability, automatic garbage collection and other services;

Designed for: Simplicity, object-oriented, network skills, robustness, security, architecture neutrality, portability, interpretive, high performance, multi-threading, dynamic

simplicity : Java rejects C + +: header file, pointer arithmetic (even pointer syntax), structure, union, operator overloading, virtual base class, etc.;

Object-oriented : a programming technique. C + + multiple inheritance, Java single inheritance + interface, Java meta-class model (METACLASS);

Network Skills : Java applications can open and Access objects on the network via a URL, such as accessing local files conveniently. To simplify network connections such as sockets, remote method invocation mechanism enables communication between distributed objects;

robustness : Early Java problem detection, late dynamic (runtime) detection, eliminate the state of error tendency ... Java uses a pointer model to eliminate the possibility of rewriting memory and corrupting data. The Java compiler can detect many problems that can be detected only at run time in other languages. Java does not require the use of pointers to construct data structures such as strings, arrays, or, if necessary, the ability to have pointers, such as linked lists. Java is absolutely secure: never access a bad pointer to a memory allocation error or prevent a memory leak.

Security : Java is suitable for network/distributed environments. Its security mechanism is difficult to deceive: runtime stack Overflow, destruction of memory outside of its own processing space, unauthorized read and write files, and other unsafe practices are prevented. Java has a digital signature class. Java has a much stronger security mechanism than ActiveX because ActiveX is controlled while the application is running and it can stop malicious damage.

architecture-Neutral : The compiler generates an architecture-neutral target file format that can be executed as long as the Java Runtime environment. Instant Compilation: Translates the most frequently used sequence of bytecode into machine code. Instant compilation alleviates the problem of generating explanatory bytecode speed slow. The virtual machine can also detect the behavior of the instruction sequence to enhance its security;

portability : The Java specification does not rely on specific implementations, the size of the basic data types and the relevant algorithms are clearly explained. Binary data is stored and transmitted in a fixed format, eliminating the problem of byte order. Strings are stored in the standard Unicode format. As a system component of the class library, a portable interface is defined;

explanatory : The Java interpreter can execute Java bytecode on any machine that has ported the interpreter.

High Performance : the instant compiler (just in time compiler) can monitor which code is executed frequently and optimize the code to improve speed. You can also eliminate function calls (that is, inline), and the instant compiler knows which classes have been loaded. If a particular function is not overwritten, it can be embedded, based on the class set that is currently loaded. If necessary, you can also undo the optimization.

Multithreading : Multithreading brings better interactive response and real-time behavior. Multithreaded compilation is simple.

Dynamic : Dynamic is important when some code is added to a running program. The current version of Java allows programmers to know the structure and behavior of objects. It is useful for systems that must parse objects at run time (Java GUI Builder, Smart Debugger, pluggable components, and object database).

Java5.0 added generics, "for each" loop, variable element parameters, auto-boxing, metadata, enumeration, static import;

Java7 added string-based switch, transform operators, binary literals, exception handling improvements;

Java details from Java Core Technology Volume 1 basics (1)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.