What are common Java terms? Java common language summary

Source: Internet
Author: User

What are common Java terms? If you do not introduce common Java terms, the general introduction to Java is incomplete. Although the source motivation for the emergence of Java is portability and security, other factors also play an important role in the final process of Java language formation. Next, let's take a look at the small series of helper house.

· Simple)

· Security (Secure)

· Portable)

· Object-oriented)

· Robust (Robust)

· Multithreaded)

· Architecture-neutral)

· Explain execution (Interpreted)

· High performance)

· Distributed (Distributed)

· Dynamic)

Among these features, security and portability have been introduced in many articles. This article mainly introduces the meaning of other features.

I. Simplicity

Java is designed to make professional programmers feel that it is both easy to learn and easy to use. If you have programming experience, you will not find Java hard to master. If you have understood the basic concepts of object-oriented programming, learning Java will be easier. If you are an experienced C ++ programmer, it would be better to study Java.

Because Java supports C/C ++ syntax and many C ++ object-oriented features, most programmers will not find it too difficult to learn Java. In addition, many confusing concepts in C ++ are discarded by Java, or implemented in a clearer and easier-to-understand manner.

In addition to being similar to C/C ++, another attribute of Java makes it easier to learn: designers strive to avoid surprising features in Java. In Java, it is seldom clear how to complete a specific task.

Ii. Object-oriented

Despite being influenced by its predecessors, Java is not designed to be compatible with source code in other languages. This allows Java developers to freely start from scratch. The result is that the Java language can be more direct, easier to use, and more practical to access objects.

With reference to the advantages of object-oriented software in recent decades, java tries to strike a balance between the "Everything is an object" of the pure evolutionary author and the "argument of the pragmatic" not discussing objects, not objects. Java's object model is simple and easy to expand. For simple data types, such as integers, it maintains high performance, but is not an object.


Iii. robustness

The multi-platform environment on the world wide makes it have special requirements for programs, because programs must be reliably executed on many systems. In this way, when designing Java, creating robust programs is given a high priority.

To achieve reliability, Java restricts you in some key areas and forces you to detect errors early in the program development process. At the same time, Java frees you from worrying about many of the most common problems that may cause programming errors. Because Java is a strict type language, it not only checks the code at compilation, but also checks the code at runtime. In fact, many of the errors that are hard to reproduce and trace frequently encountered during runtime are almost impossible to generate in Java.

It is important to know that it is a key feature of Java to make programs run in a predictable manner in different runtime environments.

To better understand how Java is robust, let's consider two main causes of program failure: memory management errors and exceptions caused by misoperations (that is, runtime errors ). In traditional programming environments, memory management is a difficult and tedious task.

For example, in C/C ++, programmers must manually allocate and release all dynamic memory. This sometimes causes problems because the programmer may forget to release the originally allocated memory or release the memory being used by some other programs. By managing memory allocation and release for you, Java can fundamentally eliminate these problems (in fact, releasing memory is completely automatic, Because Java provides automatic garbage collection for idle objects ).

In the traditional environment, exceptions may often be caused by the situation of "being divided by zero" or "file not found, however, we must use a large number of commands that are difficult to understand to manage them. Java solves this problem by providing an object-oriented Exception Processing Mechanism. A well-written Java program, all runtime errors can be managed by your program.

4. Multithreading

One of the goals of Java design is to meet people's needs for creating interactive online programs. Therefore, Java supports multi-threaded programming. Therefore, applications written in Java can execute multiple tasks at the same time.

The Java runtime system has mature solutions for multi-thread synchronization, which enables you to create a stable and interactive system. Java's multithreading mechanism is very useful, so you only need to pay attention to the implementation of program details and do not have to worry about background multitasking systems.

5. Structure neutral

A major concern for Java designers is the persistence and portability of program code. A major problem for programmers is that they cannot ensure that the program compiled today can run smoothly on the same machine tomorrow.

Operating system upgrades, processor upgrades, and changes in core system resources may make the program unable to continue running. Java designers have made many attempts to solve this problem. Java Virtual Machine (JVM) is trying to solve this problem. Their goal is "to write a program, and the program will always run anywhere and anytime ". To a large extent, Java has achieved this goal.

Vi. Explanatory and High Performance

As mentioned above, by compiling a program into a Java bytecode, Java can generate a program running across platforms. Bytecode can be interpreted and executed on any system that provides a Java Virtual Machine (JVM.

Many previous cross-platform solutions have high performance requirements. Other language systems that explain execution, such as BASIC, Tcl, and PERL, have insurmountable performance defects. However, Java can run smoothly on very low-end CPUs.

As explained above, Java is indeed an explanatory language, and the bytecode of Java has been carefully designed, therefore, it is easy to use JIT compilation technology to directly convert bytecode into high-performance local code. The Java runtime system provides this feature while still having platform independence. Therefore, "efficient and cross-platform" is no longer in conflict with Java.

VII. Distributed

Java is designed for the Internet distributed environment because it processes TCP/IP protocols. In fact, there is not much difference between accessing resources through URLs and directly accessing a file.

The original Java version (Oak) includes the built-in intra-address-space feature. This allows objects on two different computers to execute the process remotely. Java recently released a software package called Remote Method Invocation (RMI). This feature enables Client/Server programming to reach an unparalleled abstraction level.

8. Dynamic

Java programs contain a variety of runtime types for verifying and solving object access problems during runtime. This makes it possible to dynamically connect to the Code in a safe and effective way. It is also important for the robustness of the small application environment, because in the runtime system, small programs in bytecode can be dynamically updated.

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.