Java Data Base type

Source: Internet
Author: User

Byte (byte 8-128-127 0
Shot (short-integer) 16-32768-32768 0
int (integral type) 32-2147483648-2147483648 0
Long (length) 64-9233372036854477808-9233372036854477808 0
Float (float type) 32-3.40292347e+38-3.40292347e+38 0.0f
Double (dual precision) 64-1.79769313486231570e+308-1.79769313486231570e+308 0.0d
char (character type) + ' \u0000-u\ffff ' \u0000 '
Boolean (Boolean) 1 True/false false

Data that can be allocated directly in the stack is the base data type.
Reference data type: is a reference to the data in the stack, but his object is in the heap.
The default integer type in Java is type int, and if you want to define float type, add L or L to the value.
The default float is also a double-precision floating point, and if you want to define float type, add F or F to the value.

automatic conversion of basic data Types Byte->short,char, int, longDouble, floatfloat, intDouble, Long

Java Data Base type

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.