It is easy to ignore the most basic Java _java features in the interview

These new features include:

1. Provides automatic memory management, programmers do not need to allocate and release memory in the program, those terrible memory allocation errors will no longer disturb the designer;
2. Remove the puzzling and error-prone C++ language Use other methods to make up for the "pointers";
3. Avoid confusion between assignment statements (such as a = 3) and logical operation statements (such as a = = 3); 4. Cancel the complex concept of multiple inheritance. The specification of the Java language is public and you can find it on http://www.sun.com. Reading the specification of the Java language is a good way to improve your technical level.

Key Features of the Java Language The Java language has many effective features that attract programmers. The most important ones are the following:

1. Concise and effective

The Java language is a fairly concise "object-oriented" programming language. The Java language omits
all the incomprehensible and confusing features in the C++ language , such as header files, pointers, structures, units, operator
overloading, and virtual basic classes. It is more rigorous and concise.

2. Portability

For a programmer, if the program written can run on Windows,
MacOS, UNIX and other platforms at the same time without modification , it is simply a dream come true! The Java language has made this originally
out of reach thing closer and closer. Programs written in Java language
can be run on different platforms with few modifications or even sometimes without modification at all.

3. Object Oriented

It can be said that "object-oriented" is a revolution in software engineering, which has greatly improved human software
development capabilities. It is a great progress and a major milestone in software development.
In the past 30 years, "object-oriented" has made great progress, fully embodies its own value, and has
now formed an "object-oriented system analysis", "object-oriented system design", "object-oriented
"Object programming" complete system. Therefore, as a modern programming language, it cannot deviate from this direction
, and the Java language is no exception.

4. Interpretative

Java language is an interpreted language. Compared with C/C++ language, programs written in Java language are
inefficient and slow in execution. But it is precisely by running Java interpreters on different platforms and interpreting Java code
to achieve the grand goal of "write once, run everywhere". In order to achieve the goal, it
is worth sacrificing efficiency . Moreover, with the rapid advancement of computer technology and faster computing speed, users will not feel
too slow.

5. Suitable for distributed computing

The Java language has powerful and easy-to-use networking capabilities, and is very suitable for developing distributed computing programs.
Java applications can access remote objects through URLs just like accessing the local file system.
It is very simple to write Socket communication program in Java language, it is easier to use it than any other language
. And it is also very suitable for the development of Common Gateway Interface (CGI) scripts. In addition, you can use Java
applets, Java Server Pages (JSP), Servlets, etc.
to build richer web pages. .

6. Have better performance

As mentioned earlier, because Java is an interpreted language, its execution efficiency is relatively slow,
but because the Java language uses two methods, its performance is still good.
A. After the Java language source program is written, use the Java pseudo-compiler to perform pseudo-compilation, convert it into intermediate
code (also called bytecode), and then interpret it;
B. Provide a "quasi real-time" (Just -in-Time, JIT) compiler, when you need faster speed, you can
use the JIT compiler to convert bytecode into machine code, and then buffer it, so that the speed will be faster.

7. Be robust and prevent problems before they happen

The Java language does a lot of early potential problems during pseudo-compilation, and also does some
corresponding checks at runtime . It can be said to be the most stringent "compiler".
Its "prevent trouble before it happens" means stifle many errors in the program. There are often many
errors that must be exposed by running in other languages, and they are discovered during the compilation phase.
In addition, the Java language also has many features to ensure program stability and robustness, which effectively reduces
errors and makes Java applications more robust.

8. With multi-threaded processing capabilities

Thread, a lightweight process, is an essential feature in modern programming. Multi-threaded processing
capabilities enable programs to have better interactivity and real-time performance.
Java has excellent performance in multi-threading, with powerful functions that surprise designers, and
multi-threading in the Java language is very simple.

9. Has high security

Due to the careful consideration of security in the design of the Java language, many investigations have been made, making the Java
language the most secure programming language at present.
Although Sun has promised: "You can easily build an anti-virus and anti-hacking system through Java",
the truth that "there is no absolute security in the world" will not fail because of someone's promise.

Shortly after the release of JDK (Java Development Kit) 1.0,
a group of security experts from Princeton University in the United States discovered the first error in the security features of Java 1.0. Since then, Java security
issues have begun to be concerned. However, the security risks discovered so far are very trivial, and the Java development team also claims that
they attach great importance to system security bugs and will immediately fix these bugs found.
And because Sun has opened up the details of the Java interpreter, it is helpful for all walks of life to jointly
discover, prevent, and stop these security risks.

10. Is a dynamic language

Java is a dynamic language, which is manifested in the following two aspects:
A. In the Java language, you can simply and intuitively query runtime information;
B. You can add new code to a running program.

11. Is a neutral structure

"The Java compiler generates a neutral object file format." In other words, the Java compiler
generates a "neutral" bytecode that has nothing to do with any computer system after pseudo-compilation.
This kind of neutral structure is not originally created by Java. The UCSD Pascal system has already
achieved this in a commercial product before the advent of Java . In addition, there is a precedent for this method before the UCSD
Pascal. The language uses this method of reducing some performance in exchange for better portability
and versatility.
The bytecode of Java has been carefully designed to make it compatible with most
popular computer systems, easy to interpret on any machine, and easy to dynamically translate into machine code

Guess you like

Origin blog.csdn.net/qq_43567709/article/details/108743301