After reading j2se, I did not make a summary in time. Now, it is a bit laborious and I always feel that there are few points.
I have been looking forward to learning java. Now I have a simple understanding of Java, because the soft exam is needed, so I have learned a little about it. It should be helpful or helpful for beginners.
J2se features will not be described here. Please take a special plane to Baidu encyclopedia.
Java is an explanatory language, and its execution process is. java source file, compiled. class file, and then use the Java Virtual Machine (JVM) mechanism to translate the code line by line during running on different platforms. Therefore, Java implements "one-time compilation and running anywhere", that is, cross-platform.
In fact, the Java Virtual Machine decouples the operating system and class, and adds JVM as an interface between them to implement cross-platform implementation. We do not need to consider the operating system to run, you only need to program the JVM interface. JVM customizes an independent interface for each operating system to explain Java programs. However, for Java program class files, JVM provides a unified interface. Layered thinking !!
Java also has a core mechanism-the garbage collection mechanism, so that programmers no longer have worries about wrong memory operations.
Let's talk about JDK and JRE. JRE is the Java runtime environment, that is, the runtime environment of the Java program. Since it is running, of course it should contain JVM, that is, the virtual machine mentioned above, and all the class files of Java class libraries are packaged into jar in the lib directory. You can verify it by yourself. Which file is the virtual machine on windows? Everyone should know what a DLL file is. Can you see if there is a JVM. dll in JRE/bin/client? That is, virtual machines. JDK is the Java Development Kit (Java. It contains various class libraries and tools. Of course, it also includes another JRE. So why should we include another JRE? In addition, JDK/JRE/bin contains both the client and server folders and a JVM. dll. There are two virtual machines. I don't know if you have noticed this yet?
In fact, users only need to have JRE, because it is enough to meet the needs of Java program running. JDK is for Java developers.
There are so many simple introductions. The following is the graph that I summarized after learning Java. I learned the basics of Java from the basic syntax, object-oriented in Java, and Java exception handling, that is, some java programming elements. You can download images as needed (in the mindmanager export chart format ).
View Source images
Download the unit map