Java Interview Written Test-001-The Advantages of Java Language

WeChat public account: JavaWeb architect

describe

1) The Java language is a pure object-oriented language.

Java is a pure object-oriented language. "Java Programming Ideas" mentions that the Java language is a "Everything is object" language, which can directly reflect objects in real life, such as trains, animals, etc., so it is easier for developers to write programs through it.

2) Platform independence.

The Java language can "compile once, run anywhere". Whether Java programs are compiled on Windows platforms or other platforms such as Linux and MacOS, the compiled programs can be run on other platforms. Since Java is an interpreted language, the compiler will turn the Java code into "intermediate code" and then interpret and execute it on the Java Virtual Machine (JVM). Since the intermediate code is independent of the platform, the Java language can be executed well across platforms and has good portability.

3) Java has a very rich built-in library.

Java provides many built-in class libraries, which simplify the programming work of developers and shorten the development time of the project. For example, the Java language provides support for multithreading and network communication. , and most importantly, provides a garbage collector, which frees developers from managing memory.

4) Provide support for web development.

Provides support for Web application development, for example, Applet, Servlet and JSP can be used to develop Web
applications ; Socket, RMI can be used to develop class libraries for distributed applications.

5) It has better security and robustness.

Has better security and robustness. The Java language is often used in the network environment. In order to enhance the security of the program, the Java language provides a security mechanism to prevent malicious code attacks (array boundary detection and Bytecode verification, etc.). Java's strong type mechanism, garbage collector, exception handling and security checking mechanism make programs written in Java language very robust.

6) Remove the incomprehensible and confusing features of the C++ language.

For example, header files, pointers, structures, units, operator overloading, virtual basic classes, multiple inheritance, etc., make the program more rigorous and concise.

interview questions

1. The Java language is improved and redesigned from the ( ) language.
A. Ada B. C++ C. Pascal D. BASIC
Answer: B. Ada language is a language invented by the US military to integrate systems developed by different languages. Its biggest feature is real-time, and object-oriented content has been added in Ada 95. Pascal language was invented to promote structured programming. The BASIC language is a language developed by a computer to allow college students to easily control it. C++ language is a general-purpose programming language with static data type checking and supports multiple programming paradigms. It supports procedural programming, data abstraction, object-oriented programming, generic programming and other programming styles. Java language is an object-oriented language, which is similar to C++ in terms of syntax structure.


other

Source code download:

关注下方微信公众号,
回复:
JavaMB.code

Full tutorial PDF version download

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324729234&siteId=291194637