java learning day1

, The concept of package only exists in eclipse, declare which package the class is in


2. public (modifier) ​​plays a role of modification here, the class modified with public is a
public class The characteristics of public classes are the class name and the java file name Be consistent


3. {} means "code block", where the code is stored, all codes are written in the code block
() means "method", which is equivalent to the function in the C language
[] means "array", as the name suggests, a group of Data
. Represents a call
; Represents the end of a line


========================================= ===================
Syntax
1. Keywords
are words that are given specific meanings by the java language
. The letters that make up keywords are all lowercase
goto and const as reserved, not currently used
in In eclipse, the red font is the keyword
. 2. Identifier
is the character used to name classes, interfaces, methods, variables, etc.
In eclipse, non-red words are identifiers
. Naming rules:
no numbers can start,
no java The keywords in
it cannot be special symbols, except the underscore _ and $
Naming convention:
the first letter of each word is capitalized
3. Comments
Function is convenient for others to read the program more effectively, and does not participate in the compilation
Single-line comments: Only one line of text can be commented//
Multi-line comments: Many lines of text can be commented/* */
Documentation comments: Many lines of text can be commented/** */

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325825086&siteId=291194637