[問題] 有關Time,run()執行讀取問題 

看板java作者 (Go~Go~~Fighting~~)時間17年前 (2008/10/28 00:22), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串1/1
假設一個簡單的範例 public class schedule { public static void main(String[] args) { Timer timer = new Timer(); plan output = new plan(); timer.schedule(output, 1000*60*1, 1000*60*5); } } public class plan extends TimerTask { public void run() { String test = "Hello" ; } } 請問一下 , 如果要在schedule類別中讀取run裡的test字串 應該如何宣告? 麻煩請幫我解答一下 謝謝! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.104.200.96 ※ 編輯: basketballfi 來自: 59.104.200.96 (10/28 00:25) ※ 編輯: basketballfi 來自: 59.104.200.96 (10/28 00:37)

10/28 09:04, , 1F
member field
10/28 09:04, 1F
文章代碼(AID): #191UhS__ (java)