2.windows 記憶體配置
3.Linux記憶體配置
4. int 4bytes * 8 = 32bits
long 8bytes * 8 = 64bits
char 2bytes * 8 = 16bits
boolean 2bytes * 8 = 16bits
float 4bytes * 8 = 32bits
double 8bytes * 8 = 64bits
--------------------------------------------------------------------------
class MyP5_60 {
class static void main(String[] args) {
long x = 10; //10為int,casting(改型)
}
}
--------------------------------------------------------------------
class MyP5_60 {
class static void main(String[] args) {
long x = 2148000000L; //預設為int,compiler錯誤;加L則OK!
System.out.println("Long整數測試: " + x);
}
}
沒有留言:
張貼留言