Java Introduction
Java is the general name for the Java object-oriented programming language and the Java platform launched by Sun Microsystems in May 1995. It was jointly developed by James Gosling and colleagues and officially released in 1995.
Later, Sun was acquired by Oracle (Oracle), and Java became a product of Oracle.
Java is divided into three systems:
- JavaSE (J2SE) (Java 2 Platform Standard Edition, Java Platform Standard Edition)
- JavaEE (J2EE) (Java 2 Platform, Enterprise Edition, Java Platform Enterprise Edition)
- JavaME (J2ME) (Java 2 Platform Micro Edition, Java Platform Micro Edition).
In June 2005, the JavaOne conference was held and Sun publicly released Java SE 6. At this time, the various versions of Java had been renamed to remove the number "2": J2EE was renamed to Java EE, J2SE to Java SE, and J2ME to Java ME.

Main Features
-
Java is simple:
The syntax of Java is very close to C and C++, making it easy for most programmers to learn and use. On the other hand, Java discards the rarely used, hard-to-understand, and confusing features of C++, such as operator overloading, multiple inheritance, and automatic type coercion. In particular, Java does not use pointers but references, and it provides automatic allocation and reclamation of memory space, freeing programmers from worrying about memory management.
-
Java is object-oriented:
Java provides object-oriented features such as classes, interfaces, and inheritance. For simplicity, it supports only single inheritance between classes, but supports multiple inheritance between interfaces, and supports the implementation mechanism between classes and interfaces (the keyword is implements). Java fully supports dynamic binding, while C++ only uses dynamic binding for virtual functions. In short, Java is a pure object-oriented programming language.
-
Java is distributed:
Java supports the development of Internet applications. In the basic Java API there is a network application programming interface (java net) that provides class libraries for network application programming, including URL, URLConnection, Socket, ServerSocket, etc. Java's RMI (Remote Method Invocation) mechanism is also an important means of developing distributed applications.
- Java is robust:
Java's strong typing mechanism, exception handling, and automatic garbage collection are important guarantees of the robustness of Java programs. Discarding pointers was a wise choice for Java. Java's security checking mechanism makes Java more robust.
-
Java is secure:
Java is usually used in network environments; for this reason, Java provides a security mechanism to guard against malicious code attacks. In addition to the many security features of the Java language itself, Java has a security precaution mechanism for classes downloaded over the network (the ClassLoader class), such as allocating different namespaces to prevent replacing local classes of the same name, byte-code checking, and providing a security management mechanism (the SecurityManager class) that lets Java applications set security sentinels.
-
Java is architecture-neutral:
Java programs (files with the .java suffix) are compiled on the Java platform into architecture-neutral bytecode format (files with the .class suffix), and can then run on any system that implements this Java platform. This approach is suitable for heterogeneous network environments and software distribution.
-
Java is portable:
This portability comes from architecture neutrality; in addition, Java strictly specifies the size of each primitive data type. The Java system itself is also highly portable: the Java compiler is implemented in Java, and the Java runtime environment is implemented in ANSI C.
-
Java is interpreted:
As mentioned above, Java programs are compiled into bytecode format on the Java platform and can then run on any system that implements this Java platform. At runtime, the Java interpreter in the Java platform interprets and executes this bytecode; the classes needed during execution are loaded into the runtime environment at the linking stage.
-
Java is high-performance:
Compared with those interpreted high-level scripting languages, Java is indeed high-performance. In fact, Java's execution speed has been getting closer and closer to C++ with the development of JIT (Just-In-Time) compiler technology.
-
Java is multithreaded:
In the Java language, a thread is a special kind of object that must be created by the Thread class or its descendant classes. There are usually two ways to create a thread: first, use a constructor of the form Thread(Runnable) to wrap an object that implements the Runnable interface into a thread; second, derive a subclass from the Thread class and override the run method, and an object created using this subclass is a thread. It is worth noting that the Thread class already implements the Runnable interface, so any thread has its run method, and the run method contains the code the thread will execute. The activity of a thread is controlled by a set of methods. Java supports the simultaneous execution of multiple threads and provides a synchronization mechanism between threads (the keyword is synchronized).
-
Java is dynamic:
One of the design goals of the Java language is to adapt to dynamically changing environments. The classes needed by a Java program can be dynamically loaded into the runtime environment, and the required classes can also be loaded over the network. This also facilitates software upgrades. In addition, classes in Java have a runtime representation that enables runtime type checking.
Development History
- May 23, 1995: The Java language was born
- January 1996: The first JDK—JDK 1.0—was born
- April 1996: Ten of the most important operating system vendors declared they would embed JAVA technology in their products
- September 1996: About 83,000 web pages were created using JAVA technology
- February 18, 1997: JDK 1.1 was released
- April 2, 1997: The JavaOne conference was held; with over 10,000 participants, it set a record for the scale of such conferences worldwide at the time
- September 1997: JavaDeveloperConnection community members exceeded 100,000
- February 1998: JDK 1.1 was downloaded more than 2,000,000 times
- December 8, 1998: The JAVA2 enterprise platform J2EE was released
- June 1999: Sun released the three versions of Java: Standard Edition (JavaSE, formerly J2SE), Enterprise Edition (JavaEE, formerly J2EE), and Micro Edition (JavaME, formerly J2ME)
- May 8, 2000: JDK 1.3 was released
- May 29, 2000: JDK 1.4 was released
- June 5, 2001: NOKIA announced it would sell 100 million Java-enabled phones by 2003
- September 24, 2001: J2EE 1.3 was released
- February 26, 2002: J2SE 1.4 was released, and since then Java's computing power was greatly improved
- September 30, 2004, 6:00 PM: J2SE 1.5 was released, becoming another milestone in the history of the Java language. To express the importance of this version, J2SE 1.5 was renamed to Java SE 5.0
- June 2005: The JavaOne conference was held and Sun publicly released Java SE 6. At this time, the various versions of Java had been renamed to remove the number "2": J2EE was renamed to Java EE, J2SE to Java SE, and J2ME to Java ME
- December 2006: Sun released JRE 6.0
- April 20, 2009: Oracle acquired Sun for $7.4 billion, obtaining the copyright to Java.
- November 2010: Due to Oracle's unfriendliness toward the Java community, Apache threatened to withdraw from the JCP.
- July 28, 2011: Oracle released the official version of Java 7.0.
- March 18, 2014: Oracle released Java SE 8.
- September 21, 2017: Oracle released Java SE 9
- March 21, 2018: Oracle released Java SE 10
- September 25, 2018: Java SE 11 was released
- March 20, 2019: Java SE 12 was released
Java Development Tools
Try to ensure the system has at least 1G of memory; other tools are as follows:
- Linux, Mac OS, Windows 95/98/2000/XP, and WIN 7/8 systems.
- Java JDK 7. 8......
- vscode Notepad editor or another editor.
- IDE:Eclipse, IntelliJ IDEA, NetBeans , etc.
After installing the above tools, we can output our first Java program "Hello World!"
public
class
HelloWorld
{
public
static
void
main
(
String
[
]
args
)
{
System
.
out
.
println
(
"
Hello World
"
)
;
}
}
In the next chapter we will introduce how to configure the Java development environment.