Java for Android Basic note-data type

Source: Internet
Author: User

Basic data types for Java

  • Boolean type

Boolean true | False

Java is a strongly typed language, compared to the free conversion of Boolean types in JS, Java has only two true Boolean types and False,js can only be converted by itself.

  • Character type

Char

Can store a kanji, and other languages very similar no longer repeat.

  • Integral type

Byte, occupies one byte-128 ' ~127

Short 2 byte -2^15~2^15-1

int 4 byte -2^31~2^31-1

Long 8 byte -2^63~2^63-1

integer constant defaults to int type

  • Floating point Type

Float 4 bytes -3.40338 ~ 3.403E38

Double 8 bytes -1.498e308 ~ 1.798e308

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.