Zhuo Jing---java Fundamentals 2

Source: Internet
Author: User

2. Data type

Basic type:

Integral type:

BYTE byte type 8 bit (bit) -2^7~2^7-1 ( -128~127) 0000 0000

Short 16-bit -2^15~2^15-1 ( -32768~32767)

int integer 32-bit -2^31~2^31-1 (approx. 2.1 billion)

Long 64-bit -2^63~2^63-1 (if you define a long type of data, you need to add L or L after the literal

Floating point type:

Float single-precision floating-point number 32-bit precision can only be 8 (note the following plus F or f)

Double dual-precision floating-point number 64-bit accuracy approx. 20 (plus D or D in the back)

Boolean: Boolean True or False

Character type: char expression: ASCII (0-127) Unicode (65,535 characters) GBK UTF-8 iso-8859-1.

Reference type: String, array, Object

Job: Enter a lowercase letter with the console, then capitalize (toUpperCase ()) and output. Before the conversion, it needs to be judged.

Zhuo Jing---java Fundamentals 2

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.