1、java language does not use a local varible that has not been initialized.
java語(yǔ)言中,尚未初始化的局部變量不可以被使用(也就是說(shuō),在使用一個(gè)局部變量之前,必須先初始化它)。
2、There are some differences between class methods and instance methods.
類(lèi)方法和實(shí)例方法之間是有區別的。
3、A class is a data type;a class value is called an Object.
“類(lèi)”是一種數據類(lèi)型;一個(gè)類(lèi)的值稱(chēng)為對象。
4、Java only allows an object to be cloned if the object‘s class has explicitly declared itself to be cloneable by implementing the Cloneable interface.
Java中,只有當某個(gè)類(lèi)通過(guò)實(shí)現Cloneable 接口顯式的聲明它自己是可克隆的,這個(gè)類(lèi)的所屬的對象才能被克隆。
5、"=="just test whether two references refer to the same object;it does not test whether two object have the same content.
“==”只是判斷兩個(gè)“引用”引用的是否是同一個(gè)對象;它并沒(méi)有判斷兩個(gè)對象的內容是否相同。
6、java is a "pass by value" language.However, when a reference type is involved ,the value that is passed is a reference.But this is not the same as pass-by-reference.
java語(yǔ)言是“值傳遞”的。只不過(guò)在涉及“引用”類(lèi)型時(shí),被傳遞的值是一個(gè)“引用”罷了。這與“引用傳遞”有所不同。
7、An array of primitve type cannot converted to any other array type,even if the primitive base types can be converted.
原語(yǔ)類(lèi)型數據的數組不能轉化為其他的數組類(lèi)型,盡管這種原數據可以被轉化。(比如,int型雖然可以轉換為float型,但int[]型不能轉化為float[]型。)
8、Java 5.0 introduces two new types of conversions known as boxing and unboxing conversions. Boxing conversions convert a primitive value to its corresponding wrapper object and unboxing conversions do the opposite.
java5引入了boxing 和unboxing 兩種新的轉化類(lèi)型;boxing 可以將原語(yǔ)類(lèi)型數據裝化為它相應的類(lèi)包裝器對象,unboxing 則是反過(guò)來(lái)。
9、In Java 5.0 and later, you can import the static members of types as well as types themselves using the keywords ‘import static‘.
java 5.0以后的版本,通過(guò)“import”你不僅可以導入類(lèi),還可以導入這些類(lèi)的靜態(tài)成員,只需要使用‘import static‘關(guān)鍵字。
10、Each method that operates on a string typically returns a new String object that holds the modified string.
任何一種在字符串上操作的方法,返回的都是一個(gè)新的、包含修改過(guò)的字符串的String對象。
11、In java2 new io ,what implements nonblocking io is Selector!!!
在java2 新的io包(java.nio.*)中,真正實(shí)現了非阻塞的是Selector!!!
12、The New I/O API allows most channels (but not FileChannel) to be used in nonblocking mode and allows a single thread to manage all pending connections. This is done with a Selector object, which keeps track of a set of registered channels and can block until one or more of those channels is ready for I/O.
新的I/O API (java.nio.*)允許大部分的通道類(lèi)(不包括FileChannel類(lèi))用于非阻塞模式,并且允許一個(gè)單獨的線(xiàn)程來(lái)管理等待的連接。這是通過(guò)一個(gè)Selector 對象來(lái)實(shí)現的,它負責追蹤已注冊的通道對象,直到一個(gè)或多個(gè)通道已經(jīng)準備好輸入/輸出才阻塞。
聯(lián)系客服