1.JDK (Java SDK)------> JRE (Java Runtime Environment)------> JVM (Java Virtual machine)
------> Applications (JAVAC)
-------> Javaapi (Util)
2.java Running Process:
. Java source File--------javac (compilation)------->.class---------> (Java command JVM) explanation--------> OS output
3. Configure Environment variables:
Download JDK (Csdn,linux Community version 1.6-1.8)
4.public static void Main (string[] args) {} entry for all Java programs
5. Identifier: Something about the name in Java 1. Class name: Initial capitalization, cannot start with a number, cannot use Java key (reserved) words, can use letters, numbers, _,$, to make sense, hump nomenclature (when more than two words form a name, each word capitalized)
2. Variable name: Cannot start with a number, cannot use Java key (reserved) words, can use letters, numbers, _,$, to make sense, hump naming method (when more than two words form a name, each word capitalized)
6. Variable: Data type variable name = value;
int num = 10;
Data type variable name;
Variable name = value;
7. Operator: +,-,*,/,%,++,--, + + + + + before adding 1 before assigning value, after assigning the value to the variable and then 1 general summation is for example: + =
8. Logical operator: >,<,>=,<=,| |,&&,== (equals),! = (not equal to)
9.if (condition) {}
10. Select structure: If three mesh operator (condition? True result: false result)
if (condition) {
code block;
}else{
code block;
}
if (condition) {
code block;
}else if (condition) {
code block;
}else{
}
Switch switch (num) {
Case 1:
code block;
Break
Case 2:
code block;
Break
Case 3:
code block;
Break
Default
code block;
Break
}
Loop structure:
while (loop condition) {
code block;
}
do{
code block;
}while (cyclic conditions);
Do while the contents of do are executed again and again under any circumstances, while the loop is executed only if the condition is satisfied
for (initialize variable; loop condition; increment or decrement variable) {
code block;
}
Java Introductory Learning Summary