挪威w3schools.com練習Java code
/*劉任昌2022/10/24Java變數variable資料type型態*/
public class Main {
public static void main(String[] args) {
int i; /*註解java, JavaScript, CSS*/
int myNum = 5; //宣告整數integer(whole number)
float myFloatNum = 5.99f; //宣告浮點數floating point number, 4 bytes=32 bits,4位元組
char myLetter = '龍'; //宣告字元character, 2 bytes=16 bits,2位元組
boolean myBool = true; //宣告布林boolean, 1 bit,1位元
String myText = "劉任昌"; //宣告字串String
i = myLetter; //整數i=字元'龍'
System.out.println(myLetter + "字碼unicode 10進位" + i);
System.out.println(myNum);
System.out.println(myFloatNum);
System.out.println(myLetter);
System.out.println(myBool);
System.out.println(myText);
}
}
挪威w3schools.com練習Java code截圖
Java原型primitive 資料型態,撰寫模式貼上
資料型態 | 長度(位元組) | 範圍最小 | 範圍最大 |
位元數 | 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位元/td> | bbbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb |
浮點數 | 4位元組=32位元/td> | bbbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb |
倍精數 | 8位元組=64位元/td> | bbbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb |
布林 | 1位元/td> | b |
字元 | 2位元組=16位元/td> | bbbbbbbb.bbbbbbbb |
Java原型primitive 資料型態,html模式貼上原始碼
資料型態 | 長度(位元組) | 範圍最小 | 範圍最大 |
位元數 | 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位元/td> | b |
字元 | 2位元組=16位元 | bbbbbbbb.bbbbbbbb |
方思涵
回覆刪除https://pandora-mo.blogspot.com/
https://www.blogger.com/blog/post/edit/8098460896125661899/1578091197876986799
回覆刪除https://guixiu1485.blogspot.com/2022/10/java.html
回覆刪除https://winnie032879.blogspot.com/2022/10/java.html
回覆刪除https://purplefish-ouo.blogspot.com/2022/10/java.html
回覆刪除https://eric-young92.blogspot.com/2022/10/java.html
回覆刪除https://kuanhtml-css-javascript-java.blogspot.com/2022/10/20221024javavariabletype.html
回覆刪除作者已經移除這則留言。
回覆刪除https://ling-cls.blogspot.com/2022/10/java.html
回覆刪除https://erichtml-css-javascript-java.blogspot.com/2022/10/java.html
回覆刪除https://steven0918.blogspot.com/2022/10/java.html
回覆刪除作者已經移除這則留言。
回覆刪除https://sallyjhang.blogspot.com/2022/10/javay.html
回覆刪除https://meishiuanlin.blogspot.com/2022/10/java.html
回覆刪除https://liaoyongruei.blogspot.com/2022/10/java.html
回覆刪除https://chen-yu-hsi.blogspot.com/2022/10/java.html
回覆刪除https://html-css-javascript-javadd.blogspot.com/2022/10/radius-diameter-h1background-color-red.html
回覆刪除https://www.blogger.com/blog/post/edit/preview/7245421414969147391/8659940629860787154
回覆刪除作者已經移除這則留言。
回覆刪除https://tonyzhuang1.blogspot.com/2022/10/java.html
回覆刪除https://d11117328.blogspot.com/2022/10/java.html
回覆刪除https://www.blogger.com/blog/post/edit/preview/2902395579050563771/3901847490995481215
回覆刪除https://1dth36.blogspot.com/2022/10/radius-diameter-h1background-color.html
回覆刪除https://danny1219.blogspot.com/2022/10/20221024javavariabletype.html
回覆刪除https://michael-hou.blogspot.com/2022/10/java.html
回覆刪除https://xylia-lin.blogspot.com/2022/10/java.html
回覆刪除https://d11117312.blogspot.com/2023/01/java.html
回覆刪除https://d11117315.blogspot.com/2023/01/radius-diameter-h1background-color.html
回覆刪除https://html-css-javascript-javatang.blogspot.com/2023/01/w3schoolsjava-data-type.html
回覆刪除