java learning data types and operators 2-

1. Data type classification

java is a strongly typed language: the use of a b after all variables must be declared to specify the type of a variable can only accept a value type matching.

java language support types are divided into two categories: primitive types and reference types.

Basic types: boolean type comprising (only true and false) and numerical type. Type Value Type integers and floating-point type. Integer types include byte, short, int, long, char; floating point type float and double comprising

Reference types include: class, interface, and an array of null. Reference data type is a reference to an object. In particular, the strings are not basic data types, string is a class, a reference data type.

(Left for the basic types of the basic type conversion type)

 

Guess you like

Origin www.cnblogs.com/wang-mengmeng/p/11681504.html