原创 SCJP試題十六

1.             Wich three are valid declarations of a char?(choose three) A   char c1=064770; B   char c2=’face’; C   c

原创 SCJP試題一

Section(部分,節):Language Fundamentals(基本原則) Problem[1] A method is ... [Select One] [1]an implementation of an abstractio

原创 SCJP試題八

880. If you run the following code on a on a PC from line directory c:/ source: import java.io.*; class Test { public s

原创 SCJP試題十四

615. Given the following class definition: public class Droitwich{ class one { private class two{ public void main(){ S

原创 java中equals和==的區別

值類型是存儲在內存中的堆棧(以後簡稱棧),而引用類型的變量在棧中僅僅是存儲引用類型變量的地址,而其本身則存儲在堆中。==操作比較的是兩個變量的值是否相等,對於引用型變量表示的是兩個變量在堆中存儲的地址是否相同,即棧中的內容是否相同。equ

原创 SCJP試題十五

22. A Java array is an ordered collection of three kinds of things. What are they? Fill in the blank. 正確答案:primitives.

原创 SCJP試題二

  int index; Test(int mpg){ milesperGallon=mpg; index=0; } Test(){} public static void main(String[] args){ int index;

原创 SCJP十二

1. What will happen when you compile and run this program: class Test{pubilc static void main(String[]args){int length=

原创 SCJP十三

子類的構造函數會自動調用父類無參數的構造函數   在重寫中,所謂子類中方法的訪問控制不能比父類中方法的訪問控制範圍窄是指: Ø       一個package方法可以被重寫爲package、protected和public的 Ø     

原创 hashcode解析

hashcode是個啥?它與equals的關係? 1.hashcode 拆開看hash可以理解爲一種hash算法,經過算法後會得出一個值就叫code,於是得到了我們的hashcode.但是經過計算得到的hashcode不一定是唯一的,比如

原创 SCJP考題十

10.What output is produced by the following program? class Test{ public static void main(String args[]){ long size=10;

原创 intellej idea常用快捷鍵

命令名 快捷鍵 說明 編輯.摺疊到定義Ctrl + M,Ctrl + O自動確定在代碼中創建區域的邏輯邊界(如過程),然後隱藏它們。 編輯.註釋選定內容Ctrl + K,Ctrl + C使用編程語言的正確註釋語法將代碼的當前行標記爲註釋。