看板 [ java ]
討論串[問題] static nested class
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓1(1推 0噓 0→)留言1則,0人參與, 最新作者awert ( )時間13年前 (2012/04/04 16:41), 編輯資訊
0
0
0
內容預覽:
你文中提到的「只有一份 "copy"」是指 static field 特性,並不是說只要叫. static 就只能有一個存在。. JLS : 8.3.1.1. static Fields. If a field is declared static, there exists exactly one
(還有1193個字)

推噓0(0推 0噓 1→)留言1則,0人參與, 最新作者singlovesong (~"~)時間13年前 (2012/04/04 14:50), 編輯資訊
0
0
0
內容預覽:
在網路上找了一些資料 大概瞭解static nested class 的用法. 只是有一點不太清楚的是. 如果他被看成是 outer class的static member. 那麼為什麼還可以去new 它呢?. 一般的class 裡面的static variable or method 是class
首頁
上一頁
1
下一頁
尾頁