
Java Certification [SCJP]
darkula
这个作者很懒,什么都没留下…
展开
-
数组
l 陣列: 宣告l 一維陣列宣告:n int a1[] = new int[5];n int[] a1; a1 = new int[5]; // 但不可以int[5] a1((宣告陣列大小只能在”=”右邊)n int testArray[]; testAr原创 2004-10-05 16:39:00 · 785 阅读 · 0 评论 -
Garbage Collection
l Garbage Collection:l 讓物件能”有機會”被garbage collected的方法:n nulling a referencen reassigning a reference valuen isolating a referencel原创 2004-10-05 16:40:00 · 791 阅读 · 0 评论 -
Utility Classes
l Utility Classesl class、method、constructor、Boolean、...都是object。l System Properties(系統參數)用途取出或設定系統參數舉例java –Deigh=8 Testprintln(System.getPro原创 2004-10-05 16:24:00 · 1095 阅读 · 0 评论 -
Exercise of Thread(1)
1.Given the following1.class MyThread extends Thread {2. 3. public static void main(String []args){4. MyThread t = new MyThread();5. t.run();6. }7.8. public void ru原创 2004-10-04 22:03:00 · 924 阅读 · 0 评论 -
SCJP复习规划for 1.4
在javaworld.com.tw上看到的一个SCJPER的学习总结,不错,直接COPY过来用了;Chapter 1:1.1 分辨keywords, 以及記得Java所擁有的Reserve Words1.2 所有primitive data type的range, 以及他們的default value1.3 如何声明一個array. (注意anonymous array的部分, 少見) 1.4 所原创 2004-10-04 21:17:00 · 1088 阅读 · 1 评论 -
Collection Framework
l The Collection Frameworkl 特性表 有順序可重覆Thread safe排序ListVectorYesYesNoStackLinkedListNoArrayList Se原创 2004-10-05 16:53:00 · 783 阅读 · 0 评论 -
Exercise of Thread(3)
20.Given the following.public class SyncTestInner{ public static void main(String[] args) { Thread t = new Thread(){ Foo f = new Foo();{ f.increase(20);原创 2004-10-05 14:14:00 · 959 阅读 · 0 评论 -
Exercise of Thread(2)
11.Which three are methods of the Object class?(Choose three.)A. notify();B. notifyAll();C. isInterrupted();D. synchronized();E. interrupt();F. wait(long msecs);G. sleep(long msec原创 2004-10-05 00:42:00 · 1299 阅读 · 0 评论 -
关于instanceof操作符
Example: Class Teacher and Student are subclass of class Person. Person p; Teacher t; Student s; p, t and s are all non-null. if(t instanceof Person) { s = (Student)t; }原创 2004-10-05 17:22:00 · 1823 阅读 · 0 评论 -
Polymorphism
l Polymorphism 1. class A{2. int x = 1;3. int y = 2;4. int f() { return x; }5. static char sf() { return ‘A’; }6. }7. class B extend A{8. int x = 3; // sh原创 2004-10-05 16:58:00 · 847 阅读 · 0 评论 -
Exception
目的l 當發生錯誤或執行到一個throw statement,馬上停止正常的程式執行,去尋找適當的exception handler來處理throw statement所丟出的意外狀況。分類l 可以用在throw statement的:Error、Throwable、Exception、RuntimeExcepti原创 2004-10-13 18:06:00 · 1029 阅读 · 0 评论