/*
Java Data types
Java is a strong data type language and has a specific data type for each data type.
Data type 4 Classes 8 kinds
Basic data types
Integral type
Byte 1 bytes
Short 2
int 4
Long 8 L l
Floating point
Float4 F F
Double 8
Boolean
True
False
Integer default int
Decimal default Double
Reference data type class interface array
Considerations for using Variables
1. Scope
2, the same scope cannot have two variables with the same name
3. Initialization value
Must be assigned before use. It is recommended to give values at the time of definition.
To define the format of a variable:
1. Variable name of data type = initialization value
2, the data type variable name;
Variable name = initialization value;
Conversion of data types
In general, we require that the data types of the operations be consistent.
For example
int x=3;
int y=4;
int z=x+y;
Define a byte type, an int type to do the addition.
BYTE A=3;
int b=3;
Default data type conversions
Byte,short,char,int,long,float,double
Byte,short,char are not converted to each other, and their participation in the operation is first converted to the int type.
Indicates that a Boolean type cannot be converted to a data type
*/
Java Note 3