Java learning summary-the first three days

# Java has 8 basic data types, respectively

  Numbers in 1: 4 (byte, short, int, long)

  2: 2 kinds of decimal (float, double)

  3: 1 boolean for boolean

  4: 1 character char

# java has currently seen 2 variable data types, which are

  1:String

  2: Array

# Data type conversion in Java

  1: Automatic data type conversion

  2: Mandatory data type conversion

 

## Automatic data type conversion scenarios

1: When the addition of two different data types is performed: automatic data type conversion will occur (when converted: the final result is the larger of the two data types) ------ really abnormal! Why different data types should be added

2: When an assignment operation occurs, (assign lower-level data types to higher-level data types)

 

## Mandatory data type conversion

1: To force change the data type of the operation

2: How to use ----- (type) value

 

# Array in Java

1: One method currently known by arrays is: array.length ()

2: Except this, I do n’t know if there is an in operation; whether there is a sort function

Guess you like

Origin www.cnblogs.com/auschwitzer/p/12726338.html