Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How java converts long into int
How java converts long into int
Public? Class? Testing? {

Public? Static electricity Invalid? main(String[]? args)? {

//? The range represented by long is greater than int, so when the value of long is greater than the maximum value of int, the conversion will report an error, and the conversion will be correct only when the value of long variable is within the range represented by int.

Dragon? l? =? 65536;

int? Me? =? (int)? l;

system . out . println(l);

system . out . println(I);

}

}