java關鍵字

學編程吧java學習之關鍵字發不了,歡迎大家通過xuebiancheng8.com來訪問。

本次課中主要介紹了java中常見的關鍵字

abstract
const
continue default do double else
enum extends final finally float
for goto if implements import
instanceof int interface long native
new package private protected public
return strictfp short static super
switch synchronized this throw throws
transient try void volatile while

abstract 抽象的。定義抽象類和抽象方法。

assert 斷言,在junit單元測試中用到。

booleanboolean值,定義真假

break退出switch case和循環結構。

byte定義一個字節。

case 用來switch case結構中

catch 用來處理異常

char定義字符

class定義類

const定義常量。

continue結束本次循環,進入下次循環

default在switch case中,當都不匹配時執行default代碼塊

更多內容請登錄xuebiancheng8.com來觀看,祝學習愉快

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章