Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - JAVA: Int is converted to bite and double is converted to float. In the video, it is explained that the number of bytes is different and it is clicked off. What does it mean? Please raise...
JAVA: Int is converted to bite and double is converted to float. In the video, it is explained that the number of bytes is different and it is clicked off. What does it mean? Please raise...

For example, convert int to byte..

int is 4 bytes..byte is one byte..So int is 32-bit binary..byte is 8-bit..< /p>

If there is an int that is 2... then it will be 00000000....10 if converted to binary. To convert it to btye is to cut off the front... until 8 bits are left... so when converted, it will be 00000010...