Overview of Java
1.1 History of the development of Java language
In 1991, Sun Company needed programs to run with relatively small memory and chips. At first, James Gosling led a team at Sun Company to develop an Oak language. Since Oak was the name of another registered company, the name was later changed. for Java (English for the Indonesian island of Java).
Java was born in 1995, and the Java and HotJava browsers were released. The founder was James Gosling.
JDK1.0 version released in 1996
In 2009, Oracle (the world's largest enterprise software development company) acquired Sun.
It has been updated every six months in recent years and has been updated to JavaSE 19.0.
1.2 Characteristics of Java language
Open source
Simple and efficient
object-oriented
Platform independence (portability)
Support network programming
multi-threading mechanism
Dynamic memory management mechanism
safety
Cross-platform (illustrated)
1.3Java language architecture
JavaSE (Java Standard Edition): It is the most basic of the entire Java language and contains the core and most basic content of Java.
JavaEE (Java Enterprise Edition): servlet--->server+applet Server-side program development includes classes in javaSE;
And also includes classes for developing enterprise-level applications.
JavaME (Java Micro Edition): An early program suitable for electronic devices, now replaced by Android-oriented development.
1.4 Running mechanism of Java language
Develop java source code Hello.java ---->Compiler jdk---->Hello.class (standard bytecode file)---->JVM (virtual machine)---->Translate to support different platforms machine code.
1.5The relationship between JDK, JRE and JVM
JDK contains JRE, and JRE contains JVM.
Java's first program
Output "Hello World!"
//定义一个类,类名为Hello
public class Hello {
//定义主方法
public static void main(String[] args){
System.out.println(“Hello World!”);
}
}