Java Learning Note (ii) basic syntax (i)

Source: Internet
Author: User

Java as a programming language, as in other languages, there are character sets, identifiers and keywords, variables, constants, statements and other basic elements of programming languages.

Keywords: abstract, Boolean Boolean, Break out of loop, continue abort this loop, byte byte, Case,catch,char,class,const,default,do,double,else , Extends,assert,final,finally,float, For,if,implements,import,instandceof,int,interface,long,native,new, Strictfp,package bag, Private,protected,public,return,short,static,super,switch,this,synchronized,throw,throws, Transient,try,void,volatile,while, note: Main is a special name used to describe the starting method of a Java program, but it is not a keyword.

Identifier: rule:

cannot be a keyword or true,false,null;

Can contain letters, numbers 0~9, underscores, dollar sign $;

Cannot begin with a number;

is case-sensitive and does not specify the maximum length;

In addition, the name should be made known;

Hump Naming method: Applicable to the name of the class, the first letter of each word capitalized;

Pascal nomenclature: Applies to variables, the method is named, and the second one is capitalized in the first letter.

Data type: base type, integer Byte,short,int,long floating-point float,double char bool Boolean (value True, False is False ()

Java Learning Note (ii) basic syntax (i)

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.