Java Core Technology Volume 1 Chapter 1 Overview of Java Programming

Table of contents

Java is not just a language

what are the advantages of java

simplicity

internet skills

robustness

safety

Trivia

misunderstanding


Java is not just a language

As we already pointed out in the first edition, Java is not just a language. None of the many languages ​​that had appeared before this
had caused such a stir. Java is a complete platform with a vast library of
reusable code and an
execution environment that provides services such as security, portability across operating systems, and automatic garbage collection.

As a programmer, I often hope to have a language with pleasing syntax and easy-to-understand
semantics (C + is not like this). Like many other good languages, Java meets exactly these requirements. Some languages
​​provide portability, garbage collectors, etc. , but don't provide a large library. If you want fancy graphics
, networking, and database access, you have to write your own code. Java is a full-featured and excellent language
with a high-quality execution environment and a huge library.
It is precisely because it integrates multiple advantages that it
has an irresistible appeal to the majority of programmers.

what are the advantages of java

The advantage is also the original intention of the java language design

 

simplicity

Compared with C++, the syntax is simple and the amount of code is small

internet skills

Java has an extensive library of routines for handling TCP/IP protocols like HTTP and FTP. Java applications
can open and access objects on the network through UL, as convenient as accessing local files.
People have seen Java's networking capabilities and ease of use. Anyone who has ever tried network programming in another language
will marvel at how easy Java makes such a onerous task as opening a socket connection (
network connections are covered in Volume II of this book). In addition, the remote method invocation mechanism enables communication between distributed objects (also
covered in Volume II).

robustness

One of Java's design goals is to make programs written in Java reliable in many ways. Java puts a lot
of effort into early problem detection, late dynamic (run-time) detection, and elimination of error-prone
states. . . The biggest difference between Java and C++ is that the pointer model adopted by Java can eliminate
the possibility of rewriting memory and corrupting data. ,

safety

Java is good for networked/distributed environments. In order to achieve this goal, a lot of energy has been invested in security. Using Java can build anti-virus, anti-tampering system. From the beginning, Java was designed to prevent various attacks, including:
Runtime stack overflow. For example, worms and other viruses commonly used means of attack.
• Corruption of memory outside of its own processing space.
· Unauthorized reading and writing of files.

Trivia

Shortly after the successful introduction of Java, Microsoft released a product called J++ , which has the same programming
language and virtual machine as Java. Now, Microsoft no longer supports J++, replaced by another language called C#.
C# has many similarities with Java, but it uses a completely different virtual machine. There is even a J# language that can
migrate J++ applications to a virtual machine using C#.

 

 

misunderstanding

 

Guess you like

Origin blog.csdn.net/weixin_40757930/article/details/129151908