Study Notes for dark horse programmers

Source: Internet
Author: User

Watch the video: 011 _ identifier _ programmer _ Java basic video. Avi

Basic Components of Java

Keywords, identifiers, comments, constants and variables, operators, statements, functions, and arrays.

 

Keywords

 

 

Identifier

1. Some custom names in the program

2. It consists of 26 English letters (uppercase/lowercase), numbers, and 0-9 Characters: _ $.

3. Rules defining valid identifiers:

A. numbers cannot start

B. You cannot use keywords.

4. Strictly case sensitive in Java

5. Note: when naming a name, try to give it a meaningful name.

 

 

 

Watch video: 012 _ constant _ dark horse programmer _ Java basic video

Constants and variables

Classification of constants in Java:

1. integer constant, all certificates

2. Decimal constant, all decimal places

3. boolean constants, which are special and only have two values: true and false.

4. character constants. Use single quotes ('') to mark a number, letter, or symbol

5. string constants. Mark multiple characters with double quotation marks

6. null constant. Only one value is null.

 

For integers: Java has three forms

Decimal: 0-9, full 10 into 1

Octal: 0-7, full 8 into 1, starting with 0

Hexadecimal: 0-9, A-F, full 16 into 1, starting with 0x.

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.