分享興趣,傳播快樂,增長見聞,留下美好!
親愛的您,這裡是LearningYard學苑。今天小編為大家帶來「學習知多少:Java篇」,歡迎您的訪問。
Share interests, spread happiness, increase knowledge, and leave a good legacy!
Dear you, this is The LearningYard Academy. Today Xiaobian brings you "Learn how much to know :Java chapter」, welcome your visit.
一、思維導圖
一、 Mind mapping
二、基本數據類型(上)
二、 Basic Data Type (Part 1)
1、標識符
標識符是用來標識類名、變量名、方法名、類型名、數組名及文件名的有效字符序列。簡單地說,標識符就是一個名字,下面是他的一些語法規則:
1. Identifier
An identifier is a valid sequence of characters used to identify class names, variable names, method names, type names, array names, and file names. To put it simply, an identifier is a name. Here are some syntax rules for it:
(1)標識符由字母、下劃線、數字和美元符號組成,長度不受限制。
(2)標識符的第一個字符不能是數字字符
(3)標識符不能是關鍵字
(4)標識符不能是true、false、null
(1) The identifier consists of letters, underscores, numbers, and dollar symbols, with unlimited length.
(2) The first character of an identifier cannot be a numeric character
(3) Identifier cannot be a keyword
(4) Identifier cannot be true, false, or null
2、Unicode字符集
java使用Unicode字符集,該字符集最多可以識別65536個字符。在java使用的子母中,不僅包括通常的拉丁字母,還包括漢語中的漢字、日文的片假名和平假名、朝鮮文、俄文、希臘字母以及其它語言中文字。
2. Unicode Character Set
Java uses the Unicode character set, which can recognize up to 65536 characters. "In the use of Java, not only the usual Latin alphabet, but also Chinese characters, Japanese katakana and kana, Korean, Russian, Greek letters, and other language characters are included.".
3、關鍵字
關鍵字是具有特定用途或者被賦予特定意義的一些單詞,不可以把關鍵字作為標識符來用,以下是java的一些關鍵字:
3. Keywords
Keywords are words that have a specific purpose or are given a specific meaning, and cannot be used as identifiers. The following are some Java keywords:
private 私有的
Protected 受保護的
public 公共的
default 默認
abstract 聲明抽象
class 類
extends 擴充,繼承
final 最終值,不可改變的
Implements 實現(接口)
interface 接口
native 本地,原生方法(非 Java 實現)
new 新,創建
static 靜態
strictfp 嚴格,精準
synchronized 線程,同步
transient 短暫
volatile 易失
break 跳出循環
case 定義一個值以供 switch 選擇
continue 繼續
do 運行
else 否則
for 循環
if 如果
instanceof 實例
return 返回
switch 根據值選擇執行
while 循環
assert 斷言表達式是否為真
catch 捕捉異常
finally 有沒有異常都執行
throw 拋出一個異常對象
throws 聲明一個異常可能被拋出
try 捕獲異常
Import 引入
package 包
Boolean 布爾型
Byte 字節型
char 字符型
double 雙精度浮點
float 單精度浮點
int 整型
long 長整型
short 短整型
super 父類,超類
this 本類
Void 無返回值
goto 是關鍵字,但不能使用
const 是關鍵字,但不能使用
Private
Protected
Public
Default
Abstract Declare Abstract
Class class
Extensions
Final final value, unalterable
Implements implementation (interface)
Interface
Native local, native method (non Java implementation)
New, creating
Static
Strictfp is strict and accurate
Synchronized threads, synchronizing
Transient
Volatile
Break out of a loop
Case defines a value for switch selection
Continue
Do operation
Else
For loop
If if
Instanceof instance
Return
Switch is executed based on the value selection
While loop
Assert whether the expression is true
Catch catch exception
Finally, execute all exceptions
Throw throws an exception object
Throws declares that an exception may be thrown
Try catch exception
Import
Package
Boolean
Byte
Char character type
Double double precision floating point
Float single precision floating point
Int integer
Long Long integer
Short short integer
Superclass
This class
Void has no return value
Goto is a keyword, but cannot be used
Const is a keyword, but cannot be used
今天的分享就到這裡了。
如果您對今天的文章有獨特的想法,
歡迎給我們留言,
讓我們相約明天。
祝您今天過得開心快樂!
That's all for today's sharing.
If you have a unique idea for today’s article,
please leave us a message,
and let us meet tomorrow.
I wish you a happy day !
本文由learningyard新學苑原創,如有侵權,請聯繫我們!
翻譯來源於谷歌翻譯
部分來源於
百度文庫
清華大學出版《java程序設計基礎》
編輯&排版|百味
審核|閆慶紅