低--------------------------------------------------------高
byte,short,char–>int–>long–>float–>double
public class Demo02 {
public static void main ( String[ ] args) {
int i = 128 ;
double b = i;
System. out. println ( i) ;
System. out. println ( b) ;
System. out. println ( "============================================" ) ;
System. out. println ( ( int ) 23.7 ) ;
System. out. println ( ( int ) 45.89f ) ;
System. out. println ( "============================================" ) ;
char c = 'a' ;
int d = c+ 1 ;
System. out. println ( d) ;
System. out. println ( ( char ) d) ;
public class Demo03 {
public static void main ( String[ ] args) {
int money = 10 _0000_0000;
int years = 20 ;
int total = money* years;
System. out. println ( total) ;
long total2 = ( years* ( long ) money) ;
System. out. println ( total2) ;
}
}
}
}