Recently a time plan to review the Java basics, the use of video courses are still school Gao teachers, lessons learned in the course of learning
Summarize directly, convenient to review later.
One: The development of computer language
1: Machine language, the most primitive language, mainly has the "01" composition, the earliest computer uses the electron tube, 01 mainly has the high and low level control.
2: assembly language, with some special symbols, compared to machine language, more easily understood, but still not enough human.
3: High-level language, divided into process-oriented languages, such as C (Bell Labs invented), and object-oriented language, such as C + +, Java, C # and so on.
II: The development of the Java language
1:java language is invented by Sun company, it is an object-oriented language, is the C + + language as a limitation, Java's core advantage is the cross-platform nature,
Can be compiled at once and run everywhere. Mainly because of the Jvmjava virtual machine, Java for different operating systems (Windows, Linux or MAX, etc.)
Have their own JVM, so that compiled programs can run on any platform.
Version of 2:java
Javase:java Standard Edition, mainly used in PC
Javaee:java Enterprise Edition, mainly used in server-side development
Javame:java small version, mainly for the development of personal consumer products
Three: Concepts and differences of JDK, JRE, and JVM
Relationship between 1:JDK, JRE, and JVM
The Jdk:java Development Kit:java Development Kit contains the JRE and the tools used by Java developers.
The Jre:java runtime Environment:java the runtime environment, containing the JVM and some of the class library files required for Java to run.
Jvm:java virtual Machine:java VMS, Sun has developed different versions of virtual machines for different operating systems.
2:java code compilation Run process
First the developer writes the. Java source file and compiles it into a. class bytecode file so that the bytecode file can be used on any operating system
Run, can be compiled at once, run everywhere.
Four: Download, install, and configure environment variables for JDK
Download JDK: Can be downloaded to www.oracle.com official website
Install JDK: Similar to installing other software
Configure environment variables: You can refer to another blog, "Download the installation JDK, and configure the Java environment variables."
Here's a quick look, you need to configure
The JAVA_HOME:JDK installation directory, or it can not be configured. One is convenient, if the JDK directory changes, only need to change the java_home path,
Also, if the Tomcat server is used later, the environment variables will be configured.
Path: Add the Bin directory under the JDK directory to the path directory
Classpath: The role of this directory is mainly the JVM to find the directory of bytecode files, but jdk5.0 will not need to be reconfigured.
V: Verify that the environment variable is configured successfully
Through CMD into the DOS window, and then enter Javac, Java command, if there are parameters of the relevant command, the configuration is successful. If the command appears
is not a prompt for an internal command, stating that no configuration was successful.
You can also enter Java-version to view the version of the currently installed JDK
Tip: If you install only the JRE runtime environment, then the Javac compile command will not work and can only be run in Java.
VI: Compile and run the program through Javac, Java command
1:java Case Sensitive
2: Class names are generally capitalized, and class names are consistent with the class names corresponding to public
3: A source file can correspond to multiple bytecode files because there can be more than one class in a source file, but only one public
4: Write code to have indentation, enhance code readability
5: Class name, method name or variable name to achieve the name of the known meaning
6: Write code, more comments
Java Basic Learning Summary (Java language development history, JDK download installation, and configuration environment variables)