Java_ identifiers, keywords, data types

Source: Internet
Author: User
Tags float double

Identifiers consist of a letter, an underscore "_", a dollar symbol "$", or a number;

Identifiers should be preceded by letters, underscores "_", and dollar breaks;

Java identifiers are case sensitive and have unlimited length.

All keywords are lowercase english;

Goto and const are not used, but are also reserved.

Constant

Character constant ' a '

string constant "Hello World"

Variable

is a small area of memory that uses variable names to access the area, so each variable must be declared before it is used, and then it must be assigned before it can be used.

Double D1, d2, d3 = 0.123;

Member variables

Local variables

Data type

Underlying data type

The logical Boolean True/false cannot be replaced with integers of 0 or not 0

Text Char Java is Unicode encoded, with two bytes per character, so it can be represented in hexadecimal notation

Integer type Byte,short,int,long

Floating-point float double

Floating-point Precision * Float 7-bit double 15-bit

Java_ identifiers, keywords, data types

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.