w3schools資料型態
//劉任昌2022.10.27.期中考準備資料型態
public class Main { /*宣告類別class Main存檔名Main.java*/
public static void main(String[] args) {
String a=" 最小數 ", b=" 最大數 "; /*1位元組=8位元*/
String x1="位元數", x2="短整數", x3="整數", x4="長整數";
System.out.println(x1 + a + Byte.MIN_VALUE); /*位元數*/
System.out.println(x1 + b + Byte.MAX_VALUE);
System.out.println(x2 + a + Short.MIN_VALUE); /*短整數*/
System.out.println(x2 + b + Short.MAX_VALUE);
System.out.println(x3 + a + Integer.MIN_VALUE);/*整數*/
System.out.println(x3 + b + Integer.MAX_VALUE);
System.out.println(x4 + a + Long.MIN_VALUE); /*長整數*/
System.out.println(x4 + b + Long.MAX_VALUE);
}
}
資料型態,EXCEL計算比較
使用的CSS指令,自行在前後面加上:小於 style 大於
H1{background-color: red;/*背景顏色*/
color: white; /*文字顏色*/
padding: 10px; /*填充10點空間*/
text-align: center; /*文字排列置中*/
border: 20px solid purple;/*邊界:20點 實心 紫色*/
border-radius: 40px;} /*邊界-半徑radius,直徑diameter,公尺meter*/
貼上期中考重點
資料型態 | 長度(位元組) | 範圍最小 | 範圍最大 |
位元數 | 1位元組=8位元 | -128 | 127 |
短整數 | 2位元組=16位元 | -32,768 | 32,767 |
整數 | 4位元組=32位元 | -2,147,483,648 | 2,147,483,647 |
長整數 | 8位元組=64位元 | -9,223,372,036,854,780,000 | 9,223,372,036,854,780,000 |
浮點數 | 4位元組=32位元 | 1.4*10^-45 | 3.4*10^38 |
倍精數 | 8位元組=64位元 | 4.9*10^-324 | 3.4*10^308 |
布林 | 1位元 | false | true |
字元 | 2位元組=16位元 | '\u0000' | '\uffff' |
資料型態 | 長度(位元組) | 記憶體 |
位元數byte | 1位元組=8位元 | bbbbbbbb |
短整數short | 2位元組=16位元 | bbbbbbbb.bbbbbbbb |
整數 | 4位元組=32位元 | bbbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb |
長整數 | 8位元組=64位元 | bbbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb |
浮點數 | 4位元組=32位元 | bbbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb |
倍精數 | 8位元組=64位元 | bbbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb |
布林 | 1位元 | b |
字元 | 2位元組=16位元 | bbbbbbbb.bbbbbbbb |
作者已經移除這則留言。
回覆刪除作者已經移除這則留言。
回覆刪除https://jasperyang.blogspot.com/2022/10/javaminvaluemaxvalue.html
回覆刪除https://alien1213.blogspot.com/2022/10/javamaxvaluemaxvalue.html
回覆刪除作者已經移除這則留言。
回覆刪除https://cpc920508123.blogspot.com/2022/10/javaminvaluemaxvalue.html
回覆刪除https://www.blogger.com/blog/post/edit/4784021696047026617/1277604379360564648
回覆刪除https://html-css-javascript-yaoto.blogspot.com/2022/10/javanim-valuemax-value.html
回覆刪除https://spencer0309.blogspot.com/2022/10/javaminvaluemaxvalue.html
回覆刪除