Java features and development tools JDK

Source: Internet
Author: User
Java language features and development tools JDK-general Linux technology-Linux programming and kernel information, the following is a detailed description. I. Java features
As mentioned above, Java is a cross-platform, object-oriented programming language suitable for distributed computing environments. Specific
  
It has the following features: simplicity, object-oriented, distributed, interpreted, reliable, secure, platform-independent, portable, high
  
Performance, multithreading, and dynamic. Next we will focus on the object-oriented, platform-independent, distributed, and multithreading of Java.
  
, Reliability, security, and other features.
  
1? Object-oriented
  
Object-oriented is actually a natural extension of real-world models. Any entity in the real world can be seen as an object. Between objects
  
Message interaction. In addition, any entity in the real world can belong to a certain kind of things, and any object is of a certain kind of things.
  
Instance. If the traditional procedural programming language is process-centric and algorithm-driven, the object-oriented programming language is
  
Message-driven, object-centric. It is represented by formulas. Procedural programming languages are: program = Algorithm + data; Object-Oriented Programming Languages
  
Statement: program = Object + message.
  
All object-oriented programming languages support three concepts: encapsulation, polymorphism, and inheritance, and Java is no exception. In the real world
  
An object has properties and behaviors, which are mapped to a computer program. properties represent the data of the object, and behavior represents the method of the object.
  
Is used to process data or interact with the outside world ). The so-called encapsulation is to use an autonomous framework to combine object data and methods.
  
As a whole. It can be said that objects are the means to support encapsulation and the basic unit of encapsulation. Java is highly encapsulated because
  
Java has no full-Process Variables and no main functions. In Java, most of the members are objects, only simple numeric, character, and Layout
  
Except for the er type. For these types, Java also provides the corresponding object types for interaction with other objects.
  
Polymorphism is manifested in multiple forms. Specifically, it can be represented by "one external interface and multiple internal implementation methods. Example
  
For example, a computer stack can store data in various formats, including integer, floating point, or character. No matter what type of storage
  
The Algorithm Implementation of Data and stack is the same. For different data types, programmers do not have to manually select, just use unified connection
  
Port name, which is automatically selected by the system. Operatoroverload has always been regarded as an excellent multi-State mechanism,
  
However, Java canceled the program because it made it hard to understand.
  
Inheritance means that an object directly uses the attributes and methods of another object. In fact, many of the entities we encounter have inherited
  
Meaning. For example, if a car is regarded as an entity, it can be divided into multiple entities, such as trucks and buses. These sub-instances
  
Because they all have the characteristics of cars, cars are their "Fathers", and these are the "children" of cars ". Java
  
Provides you with a series of classes. Java classes have hierarchies that inherit the attributes and methods of the parent class. And other
  
Different object-oriented programming languages, Java only supports a single inheritance.
  
2? Platform independence
  
Java is a platform-independent language. It means that applications written in Java can run on different software and hardware platforms without modification. Ping
  
There are two types of independence: source code level and target code level. C and C ++ have a certain degree of source code-level platform independence, indicating that C or C ++
  
The written applications can be run on different platforms without modification.
  
Java mainly relies on Java Virtual Machine (JVM) to implement platform independence at the target code level. JVM is an abstract machine attached to
  
On the operating system of the physical server, it has a set of virtual machine commands and its own stack and register group. But the JVM is usually on the software and
  
It is not implemented on hardware. (Currently, SUN has designed and implemented Java chips, mainly used on Network Computer NC.
  
In addition, the emergence of Java chips also makes Java more easily embedded into household appliances .) JVM is the foundation unrelated to the Java platform.
  
There is a Java interpreter used to explain the program compiled by the Java compiler. After writing the software, Java programmers
  
The compiler compiles the Java source program into the JVM byte code. Any machine with a Java interpreter can run this
  
Program, regardless of the platform on which the bytecode is generated. In addition, Java uses IEEE-based data types.
  
JVM ensures data type consistency and Java platform independence.
  
Java platform independence has far-reaching significance. First, it makes the programmer dream
  
Running on any platform) becomes a reality, which will greatly accelerate and promote the development of software products. Second, Java's platform independence is just welcome
  
Combined with the concept of "Network Computer. If a large number of commonly used applications (such as word processing software) are rewritten in Java, and
  
On an Internet server, NC users do not need to occupy a lot of space to install the software. They only need one
  
Java interpreter. You can download the byte code of the software whenever you need an application. The running result can also be sent back to the server.
  
Server. Currently, several companies have begun to use this new computing model to build their own enterprise information systems.
  
3? Distributed
  
Distributed includes data distribution and operation distribution. Data distribution refers to the distribution of operation data that can be distributed across different hosts of the network.
  
Computing is distributed across different hosts for processing.
  
Java supports the WWW client/server computing mode. Therefore, it supports these two distributions. For the former, Java provides
  
An object called a URL. With this object, you can open and access objects with the same URL address.
  
The local file system is the same. For the latter, the Java applet can be downloaded from the server to the client.
  
To improve system execution efficiency.
  
Java provides a complete set of Network Libraries. developers can use class libraries to design network programs. This facilitates Java
  
Layout features.
  
4? Reliability and security
  
Java was initially designed to be used in electronic consumer products, so high reliability is required. Although Java originated from C ++
  
Eliminate many unreliable factors in C ++ and prevent many programming errors. First, Java is a strongly typed language and requires explicit methods.
  
Statement, which ensures that the compiler can detect method call errors and make the program more reliable. Second, Java does not support pointers.
  
Out of memory access; third, Java automatic Unit collection prevents problems caused by memory loss and other dynamic memory allocation;
  
4. Check the runtime of the Java interpreter to detect the out-of-bounds of array and string access. Finally, Java provides exception handling.
  
Mechanism, the programmer can put a set of error code in one place, which can simplify the error handling task for easy recovery.
  
Java is mainly used for network application development, so it has high security requirements. If there is no security guarantee, the user
  
It is very dangerous to download programs from the network. Java uses its own security mechanism to prevent virus programs from being generated and downloaded.
  
Damage to the local system. When the Java bytecode enters the interpreter, it must first be checked by the bytecode validator.
  
The interpreter will determine the memory layout of classes in the program. Then, the class loader is responsible for loading classes from the network to separate memory areas,
  
Avoid interference between applications. Finally, the client user can restrict the classes loaded from the network to only access certain files.
  
Component System.
  
These mechanisms are combined to make Java a secure programming language.
  
5? Multithreading
  
A thread is a new concept in the operating system. It is also called a lightweight process and is a smaller unit of concurrent execution than a traditional process.
  
C and C ++ adopt a single-threaded architecture, while Java provides multi-threaded support.
  
Java supports multithreading in two aspects. On the one hand, the Java environment itself is multi-threaded. Required for running several system threads
  
Useless unit recycling, system maintenance, and other system-level operations. On the other hand, the Java language has built-in multi-thread control, which can greatly simplify multiline
  
Application development. Java provides a class Thread, which is responsible for starting and running the Thread, terminating the Thread, and checking the Thread status. Java
  
The thread also includes a set of synchronization primitives. These primitives are responsible for implementing concurrency control on threads. Using Java's multi-threaded programming interface, developers
  
Developers can easily write multi-threaded applications to improve program execution efficiency. Note that Java multithreading supports
  
To a certain extent, it is limited by the platform supported during running. For example, if the operating system itself does not support multithreading, Java's multithreading feature
  
It may not be displayed.
  
Ii. Java applets and Applications
Java can be used to write two types of programs: applets (also called Java applet) and applications (JavaApplication ). Cheng
  
The Java program is embedded in the HTML document, while the Java application is a program that runs from the command line. For Java, Java applets
  
There is no limit on the size and complexity. In fact, Java applets are more powerful than Java applications. However
  
Internet communication speed is limited, so most small programs are small. The technical difference between a Applet and an application lies in the runtime environment.
  
Java applications run in the simplest environment. The only external input is the command line parameter. On the other hand, Java applets require
  
It requires a lot of information from the Web browser: it needs to know when to start, when to put in the browser window, where, and when to activate and close. Because
  
These two different execution environments have different minimum requirements for applets and applications.
  
WWW makes publishing of small programs very convenient, so small programs are more suitable for Internet applications. On the contrary, non-network systems
  
Systems with less memory are more suitable for Java applications than those with less Java applets. In addition, Java applications can easily
  
Internet-based environment, in fact some excellent Java applications.
Related Article

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.