Java keywords and symbols use

Source: Internet
Author: User
Tags java keywords

1. Use semicolons, keywords, blanks, curly braces, etc. 1.1 semicolon:

in Java , Some characters are used as delimiters , and the most commonly used separators are semicolons (;), which are used to separate statements

1.2 Keywords:

Java keywords are pre-defined in a computer language, with special identifiers, sometimes called reserved words, and variables of special significance. java 's keywords have special meanings for java compilers, they are used to represent a data type, or to represent the structure of a program, and the keyword cannot be used as a variable name, method name, class name, package name, or parameter.

Class enum,interface,class,extends, Implements

Object New,instanceof,this,Super

Package,import

Data type Byte short int , Span style= "Font-family:calibri" >long , float , double , char , boolean

Branch if, else,switch,case,break, Continue

Loop do,while, for

method void,return

Exception Throw throws try , Span style= "Font-family:calibri" >catch , finally

Modifier abstract, final private , protected public Static synchronized , STRICTFP , native , assert , transient , volatile

Reserved word const,goto

1.3 blank:

1. when you encounter an operator in your code, such as = , leave a space at both ends to enhance the readability of your code.

2. Between lines of code, you can add blank lines based on logical relationships to enhance readability.

1.4 Curly braces {}:

1. Used to include the value of an automatically initialized array.

2. used to define program blocks , classes , methods, and local scopes.

Java keywords and symbols use

Related Article

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.