→ PsMonkey:就跟你說查 source code 了... 也未必會有最後一個 11/23 09:27
→ TWTRubiks:是直接google嗎?還是說要去哪查? 11/23 12:21
http://www.oracle.com/technetwork/java/javase/downloads/index.html
有一項叫做
Java SE 6 JDK Source Code
點進去後左邊那邊就有
Source code
Mercurial (6, 7, 7u, 8)
Bundles (6, 7, 7u)
然後..... 開你習慣用的code管理工具搜索 "class Thread " <=注意空白
就可以把那個物件給找出來
/**
* Returns a string representation of this thread, including the
* thread's name, priority, and thread group.
*
* @return a string representation of this thread.
*/
public String toString() {
ThreadGroup group = getThreadGroup();
if (group != null) {
return "Thread[" + getName() + "," + getPriority() + "," +
group.getName() + "]";
} else {
return "Thread[" + getName() + "," + getPriority() + "," +
"" + "]";
}
}
如果有興趣的話可以去翻來看看
裡面還有JVM的code
但老實說,除非未來打算往JVM深入
或是打算用C寫東西給JAVA native來native去的才會用到這些東西
否則,把查javadoc的能力點高一點還比較有用
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.59.16.65
推 PsMonkey:==.=== 練習看 source code 害不死人的 11/23 13:37
→ awert:只會看javadoc沒用,讀code 11/24 00:54
→ LaPass:看code是姬本技能.... 11/24 01:06
推 supercygnus:噓ps猴子 11/24 21:14
推 tgenie: 雖然是老文了 但有學到哪裡看SOURCE CODE 感謝 11/03 21:11