Java Fundamentals 3

Source: Internet
Author: User
Tags java keywords

Integer type: Byte, short, int, long.

Float type: Float single precision, double dual precision

Character type: char character

Logical Type: Boolean Boolean (Value only true and false)

Strings: String

Two-character occupancy

The code for ' A ' is: 65 and so on

The code for ' A ' is: 97 and so on

declaring variables

Data type variable name = value;

Three identifiers

System definition

1 consists of a letter, an underscore "_", a dollar symbol "$", or a number. 2 should start with a letter, underscore, dollar symbol. 3Java identifiers are case sensitive and have unlimited length. 4 "See the name" 5 cannot be the keyword 6 stick to the Hump nomenclature user-defined 1 a custom identifier cannot duplicate a keyword. 2 variable names to all lowercase 3 constant names to all caps four Java keywords All Java keywords are in lowercase english. Force data type conversion int x = 2.3;int x = (int) 2.3;

Java Fundamentals 3

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.