Java Introductory Learning Summary

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.