李翊愷java data type期中考
/*李翊愷2022/10/28w3schools資料型態date type*/ public class Main { public static void main(String[] args) { float f1 = 353; /*宣告實數,浮點數,4 bytes位元組=32bits位元*/ double d1 = 124d; /*宣告倍精術數,8 bytes位元組=64 bits位元*/ byte i1; short i2;/* 位元數,1位元組; 短整數2位元*/ int i, j; /* 整數 ,4 bytes位元組=32bits位元*/ char dragon = '龍'; i = dragon ;/*字元佔2 bytes,i字碼*/ System.out.println("位元數最小" + Byte.MIN_VALUE); System.out.println("位元數最大" + Byte.MAX_VALUE); System.out.println("短整數最小" + Short.MIN_VALUE); System.out.println("短整數最大" + Short.MAX_VALUE); System.out.println( dragon ); System.out.println( i ); } } //李翊愷2022/10/28w3schools資料型態date type public class Main { public static void main(String[] args) { int i, j; /* 整數 ,4 bytes位元組=32bits位元*/ for ( i = 40800; i