---restore content starts---
Java data types are divided into: numeric and Character and Boolean
Numeric types are divided into integers (integer) and floating point (decimal),
The integer type is divided into four types, byte bits, short type, int type, long type.
Byte is the smallest unit, a byte of 8 bits, which is characterized by a small footprint.
The value range is between -128~+127. If this range is exceeded, the code will make an error.
Short is a shorter integer, 16 bits 2 bytes, and the range of values is between -3,2768~+3,2767
The int type is the default type for integer values, 32 bits 4 bytes, and the range of values is between -21,4748,3648~+21,4748,3647.
Long is an integer type of length, 64 bits and 8 bytes, long is followed by a value of L, and the value range is between -922,3372,0368,5477,5808~+922,3372,0368,5477,5807.
Floating-point types are divided into single-precision floating-point types and double-precision floating-point types.
floating-point types are classified into float and double two types. Float is a single-precision floating-point type, using the FLOAT keyword to define the floatxing type variable, when using the float type for assignment, F and F must be added at the end, otherwise the system defines it as a double variable.
Double-precision floating-point type, which uses the Double keyword to define a double variable, and the end must be D or D when assigned with a double type, but not added.
Character Type--char
When using the char type, char x = ' A ' assignment must be in single quotation marks and cannot use double quotation marks. and the single quotation mark must be a single letter. Assign a value with int,
Boolean type
The Boolean type is only two and expresses true true and false for errors.
The various data type codes are as follows:
1. Integer type:
Integer type
BYTE b=-128;
BYTE b1=13;
System.out.println (B1);
Short s=32767;
int i=2147483647;
Long l=1234567898787888067l;
Connector characters
System.out.println ("b=" +b1);
System.out.println ("s=" +s);
System.out.println ("i=" +i);
System.out.println ("l=" +l);
Addition operation
System.out.println (I+L);
Floating-point types
float F = 123.45F;
Double d = 123456.789D;
System.out.println ("F");
System.out.println ("D");
System.out.println ("f=" +f);
System.out.println ("d=" +d);
Character type
char c = ' a ';
System.out.println ("c=" +c);
c = 123;
System.out.println ("c=" +c);
c = 234;
Boolean type
Boolean BL = true;
Boolean BT = FALSE;
Carriage return newline escape character
System.out.println ("This is a word for the line");
System.out.println ("This is a word \ t tab");
System.out.println ("This is a sentence \ r enter");
System.out.println ("This is a word \ t to change the line");
System.out.println ("This is a word \ \ newline");//define yourself as a tab
int A;
a=123;
int m = 456;
int n,z,x;
int n=123,z=345,x=234;
System.out.println ("a =" + a);
Java syntax Basics-data types