public class Demo04 {
public static void main ( String[ ] args) {
int i = 128 ;
byte b = ( byte ) i;
double c = i;
System. out. println ( i) ;
System. out. println ( b) ;
System. out. println ( c) ;
System. out. println ( "====================================" ) ;
System. out. println ( ( int ) 23.7 ) ;
System. out. println ( ( int ) - 45.89f ) ;
System. out. println ( "====================================" ) ;
char e = 'a' ;
int d = e+ 1 ;
System. out. println ( d) ;
System. out. println ( ( char ) d) ;
}
}
public class Demon05 {
public static void main ( String[ ] args) {
int money = 10 _0000_0000;
int years = 20 ;
int total = money* years;
System. out. println ( total) ;
System. out. println ( "=================total2========================" ) ;
long total2 = money* years;
System. out. println ( total2) ;
System. out. println ( "=================total3========================" ) ;
long total3 = money* ( ( long ) years) ;
System. out. println ( total3) ;
System. out. println ( "==================total4=======================" ) ;
long total4 = money* ( ( long ) years) ;
System. out. println ( total4) ;
System. out. println ( "====================total5=====================" ) ;
long total5 = ( ( long ) money* years) ;
System. out. println ( total5) ;
}
}