Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How to change Int installation into Long installation in Java?
How to change Int installation into Long installation in Java?
Int and Long are basic data types, which can be converted into long and then generate long data.

The code is as follows:

Dragon? l? =? New? long((long)3); In this way, the int type can be successfully converted to the Long type.

Int stands for a class and is an integer class. In other words, you have to follow an integer. If it is a decimal, it will be reported as an incompatible type. Int has a wide range of values, from [-(3 1 to the second power)] to [+(3 1 to the second power)-1]. Int is usually enough, others such as short and long are rare, because they are object-oriented and related to objective reality. Long is generally only used for astronomical figures.