Re: [問題] 新手Thread (執行緒問題)

看板java作者 (LaPass)時間13年前 (2012/11/23 13:12), 編輯推噓3(302)
留言5則, 5人參與, 最新討論串2/3 (看更多)

11/23 09:27,
就跟你說查 source code 了... 也未必會有最後一個
11/23 09:27

11/23 12:21,
是直接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

11/23 13:37, , 1F
==.=== 練習看 source code 害不死人的
11/23 13:37, 1F

11/24 00:54, , 2F
只會看javadoc沒用,讀code
11/24 00:54, 2F

11/24 01:06, , 3F
看code是姬本技能....
11/24 01:06, 3F

11/24 21:14, , 4F
噓ps猴子
11/24 21:14, 4F

11/03 21:11, , 5F
雖然是老文了 但有學到哪裡看SOURCE CODE 感謝
11/03 21:11, 5F
文章代碼(AID): #1GhmMt6A (java)
文章代碼(AID): #1GhmMt6A (java)