Presentation is loading. Please wait.

Presentation is loading. Please wait.

Review 1~3.

Similar presentations


Presentation on theme: "Review 1~3."— Presentation transcript:

1 Review 1~3

2 編譯器(C語言)

3 直譯器(python語言)

4 跨平台的Bytecode(java語言)
翻成.class的bytecode, 就可以在各種平台上執行 直譯器

5 基本注意項目 檔名必須和public的類別名稱一致 main 是程式的起點 每一行結尾都必須要加上分號

6 變數資料型態 資料型態 基本資料型態 參考資料型態

7 基本資料型態 byte short int long float double boolean char 大小關係要注意 由小到大
數字型態 整數型態 byte short int long 浮點數型態 float double 非數字型態 布林 boolean 字元 char 大小關係要注意 byte short int long float double boolean char 由小到大

8 參考資料型態 int x = 10; int y = x; Object o1 = new Object();
Object o2 = o1; x y都是直接放值,所以是基本資料型態 o1 o2裡面都是放位址,真正資料所在的記 憶體位址 也稱為參考位址,所以被稱為參考 資料型態 只要不是那八種基本資料型態就是參考資料 型態 請問 String a=“help”; a是基本還是參考資料型態?

9 變數注意事項 變數必須先宣告 int i=20; 常數 不能修改 final int j=20; j=30; 錯誤 不能修改
科學記號 1.3E2  E代表10的次方 2.0E-3 E240 20.0ffloat 大小寫都是一樣 20.0ddouble 20Llong 0b0100二進制4 070八進制8 0x12十六進制18

10 跳脫字元


Download ppt "Review 1~3."

Similar presentations


Ads by Google