List of Java keywords (sorted by alphabetical total of 51 groups):
Abstract, Assert,boolean, break, Byte, case, catch, char, class, const, continue, default, Todo, double, else, Enum,extends, Final, finally, float, for, if, implements, import, instanceof, int, interface, long, native, new, package, private, prot ected, public, return, short, static, STRICTFP, super, switch, synchronized, this, throw, throws, transient, try, void, VO Latile, while
Java reserved word list (14 groups alphabetically): Java reserved word refers to an existing Java version that is not in use but later versions may be used as a keyword.
Byvalue, cast, false, future, generic, inner, operator, outer, rest, True, Var, goto, Const,null
Oh, no matter what else, to a few topics first, against your cow ^_^
1, which of the following are keywords or reserved words in Java?
a) if b) then C) Goto D, while E, case f) sizeof
2, which of the following are Java key words?
A) double b) Switch c) then D) instanceof
3, which of are key words in Java?
(a) default B) NULL c) String D-throws E) long F) true
The answer is 1,ACDE 2,ad 3,adef? ^_^
Explain to 1,then and sizeof are not Java keywords, familiar with C or C + +, write accustomed to the master of the ASP will be careful.
2, all the keywords are lowercase, so the switch is not a keyword. Instanceof looks like a method name, but it's actually a keyword;
3, uppercase NULL is not a keyword in the Java language. String is the class name of a encapsulated class in the Java language and is not a keyword.
Let's get some more system:
It is important to correctly identify the Java language keywords (keyword) and reserved words (reserved word). Java keywords have special meaning for Java compilers, they are used to represent a data type, or to represent the structure of a program. Reserved words are keywords reserved for Java, and although they are not currently keywords, they may be used as keywords in later upgrades.
Keyword list
Abstract Boolean break byte
Catch Char class continue default
Do double else extends false
Final finally float for if
Implements import instanceof int interface
Long native new NULL package
Private protected public return short
Static Super switch synchronized this
Throw throws transient true try
void volatile while
Reserved word
Const,goto
Pay attention.
Identify keywords in the Java language and do not confuse them with keywords from other languages such as C + +.
Const and Goto are reserved words in Java.
All the keywords are lowercase
Friendly,sizeof is not a Java keyword
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.