short: 2 bytes
int: 4 bytes
long: 10 bytes
Avoid using magic numbers
Replace odd values with constants
According to Alibaba regulations, magic values refer to numbers that appear in the code without clear meaning. These numbers often require reading other codes to infer their meaning, which brings great inconvenience to later maintenance and other personnel reading the code. Using magic values increases the vulnerability of the program. Once these numbers are changed, all the magic values need to be found in the code and modified, which consumes a lot of time and effort.