Java Basics: Data types

Source: Internet
Author: User

Java data types: Basic types and reference types

Base type: Numeric, where numeric types are integer, float, Integer includes byte, short, int, long, and the default is int. Floating-point types are classified as single-precision, double-precision, and are divided into float, double, and default to the double type. Note The amount of space occupied by various types.

In addition to numeric types, it also includes the bool, char type, where the char type corresponds to an int number.

Overflow: Forced type transition causes overflow, data type not overflow

Reference type: Class, interface, array

Java Basics: 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.