What are java keywords

(*-*)浩
Release: 2019-11-13 13:13:30
Original
4983 people have browsed it

Java keywords are pre-defined identifiers with special meanings in the computer language, sometimes called reserved words, and variables with special meanings. Java keywords have special meaning to the Java compiler. They are used to represent a data type, or the structure of a program, etc. Keywords cannot be used as variable names, method names, class names, package names, and parameters.

What are java keywords

Java keywords are strings that have special meaning to the Java compiler. They are compilers and programs. An agreement among programmers, programmers use keywords to tell the compiler information such as variable types, classes, method characteristics and other information they declare. The Java language defines a total of keywords as shown below.(Recommended study:java course)

What are java keywords

Keywords are always identified with lowercase letters, press The uses are divided into the following groups.

(1) is used for data types.

The keywords used for data types are boolean, byte, char, double, false, float, int, long, new, short, true, void, instanceof.

(2) is used for statements.

The keywords used for statements include break, case, catch, continue, default, do, else, for, if, return, switch, try, while, finally, throw, this, super.

(3) Used to modify

The keywords used for modification include abstract, final, native, private, protected, public, static, synchronized, transient, volatile .

(4) is used for methods, classes, interfaces, packages and exceptions.

The keywords used for methods, classes, interfaces, packages, and exceptions are class, extends, implements, interface, package, import, and throws.

There are also some keywords, such as cat, future, generic, innerr, operator, outer, rest, var, etc., which are meaningless keywords reserved by Java.

In addition, Java has three reserved words: true, false, and null. They are not keywords, but text. Contains Java-defined values. Like keywords, they cannot be used as identifiers.

The above is the detailed content of What are java keywords. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!