Definitions and features of keywords:
Definition: A string (Word) that is given special meaning by the Java language and used as a specialized purpose
Feature: all letters in the keyword are lowercase.
Keywords to define the data type:
Class (classes), Interface (interface), enum (enum), Byte, short, int, float, double, long, char, boolean, void
Used to define data types worth keywords:
True, FALSE, NULL
Keywords used to define Process control:
If, else, do, while, switch, case, default, for, continue, break, return
The keyword used to define the access permission modifier:
Private, public, protected
Keywords for defining classes, functions, variable modifiers:
Abstract, final, static, synchronized
Keywords used to define the relationship between classes and classes:
Extends, implements
Used to define keywords that establish instance reference instances and determine instances:
New, this, super, instanceof
Keywords for exception handling:
Try, catch, finally, throw, throws
Keywords used to define the package:
Package, Import
Other modifier keywords:
Native, strictfp, transient, volatile, assert
The sequence of characters used in Java to name features such as variables, methods, and classes is called identifiers.
Any place that can name itself is called the identifier.
Rules for defining legal identifiers:
1, by 26 letters of the letter case, 0-9, _ or $ composition, such as: Stuname, Stu_01name, _stu
2, the number can not start, such as: 09stu (this error)
3. You cannot use keywords or reserved words, but you can include keywords or reserved words. such as: Stunewname
4, Java strictly case-sensitive, length unlimited.
5. Identifiers cannot contain spaces.
Note: In the name of the time, in order to improve the reading, the name should be as far as possible "see the name of understanding."
Specification for name commands in Java:
1, Package Name: Multi-word composition, all the letters of the word are lowercase, such as: xxxxyyyy.
2. Class name, Interface name: When multiple words are composed, capitalize the first letter of all words, such as: xxxxyyyy.
3, variable name, function name (method name): When multiple words are composed, all words, except the first word Weishou letter lowercase, the first letter of the remaining words capitalized, such as: xxxxyyyy.
4, Constant name: multi-word composition, all the letters are capitalized, the word and the word with an underscore connection, such as: Xxxx_yyyy_zzzz.
Java basic Syntax day01_08 keyword _ identifier usage