Knowledge gained again, 20200626~20200629

Java basics
1, bare metal: a computer without any software installed

2. ctrl+y: anti-cancel

3. Environment variables are divided into user variables (for the current user) and system variables (for all users)

4. Java evolved from c++, James Gosling

5. Java language has three versions: J2SE (standard version, writing small programs but ugly UI)
J2EE (enterprise version, writing web projects)
J2ME (small version, writing apps in mobile phones)

6. Currently developed to version 14, 8 is the most stable

7. Java cross-platform principle: virtual machine technology, that is, install the corresponding JVM on different platforms, the JVM interprets the compiled .class bytecode file of the java source file into the corresponding platform machine code and executes it.

8. The role and relationship of the three JDK JRE JVM:
JVM: Java virtual machine, which interprets the compiled .class bytecode file of the java source file into the corresponding platform machine code and executes it to achieve Java cross-platform.
JRE: Java runtime environment, all Java programs must be run under JRE. Including JVM and JAVA core class libraries and supporting files.
JDK: Java development tools are the core of the entire Java, including the Java runtime environment JRE, a bunch of Java tools and Java-based class libraries.
JDK (java runtime tool) = JRE (java runtime environment) + java development tool
= JVM (java virtual machine) + lib (core class library) + java development tool
Insert picture description here

9. JDK installation: "Retry, Ignore, Cancel"
appears, choose to ignore the JRE installation window and directly fork it (JDK has been installed once)

10. Environment variables of JDK (above 6): the simplest is just the path, the bin directory of jdk
In order to facilitate the future change of jdk version, and Tomcat must be required, so it is equipped with java_home (JDK directory)

11. JDK uninstall: control panel—program function—JDK, right click to uninstall.
Delete related environment variables: JAVA_HOME, classpath, path related to jdk in
C:\Windows\System32 directory, all files beginning with java are deleted (except JavaScript)

12. The db in the JDK directory is a built-in database for java.

13. How many classes are in the source file and how many bytecode files will be generated after compilation? The source file name is consistent with the class name modified by public

14. Java data types are divided into 8 basic types (byte, short, int, long, float, double, char, boolean) and 3 reference types (class, array, interface)

15. Hump naming: Big hump: class name, the first letter of each word is capitalized
Small hump: variable name, method name, the first letter of the first word is lowercase, the first letter of the following words is all uppercase

16. View the project location in eclipse: right click—Show In—System Explorer

17. Scientific notation: E
double d1 = 3.14E3; (3.14*10^3=3140)
double d2 = 3.14E-3; (3.14/10^3=0.00314)

18. Regarding long and int, if L is not added when declared as Long type, then this number is of type int (values ​​are [-2147483648,
2147483647 ]) eg: wrong: long a = 2147483648
correct: long b = 2147483648L

Guess you like

Origin blog.csdn.net/ExceptionCoder/article/details/107025488