skip to main | skip to sidebar

我思故我在

2008年2月2日 星期六

None static Nest class不能有static member

class Outer4{
 class Inner4{
   static private String InnerStr="";//錯誤
   static public void InnerFun(){}//錯誤
 }
 Inner4 inner;
 public static void main(String[] arg){}
}
 /*
 none static nest class 一定要依附外部class實體而存在,不能單獨產生
 */
張貼者: 人馬座 於 凌晨2:56

沒有留言:

張貼留言

較新的文章 較舊的文章 首頁
訂閱: 張貼留言 (Atom)

網誌存檔

  • ►  2025 (1)
    • ►  1月 (1)
  • ►  2024 (2)
    • ►  12月 (1)
    • ►  3月 (1)
  • ►  2023 (5)
    • ►  10月 (1)
    • ►  8月 (1)
    • ►  5月 (2)
    • ►  4月 (1)
  • ►  2021 (11)
    • ►  11月 (1)
    • ►  5月 (1)
    • ►  4月 (2)
    • ►  3月 (6)
    • ►  1月 (1)
  • ►  2020 (4)
    • ►  12月 (2)
    • ►  11月 (1)
    • ►  10月 (1)
  • ►  2019 (1)
    • ►  2月 (1)
  • ►  2014 (1)
    • ►  6月 (1)
  • ►  2012 (1)
    • ►  3月 (1)
  • ►  2011 (1)
    • ►  8月 (1)
  • ▼  2008 (9)
    • ▼  2月 (7)
      • Nest class可overriding或定義新成員變數及方法但不能定義新建構子
      • None static Nest class不能有static member
      • None static Nest class 建立時使用 外部實體.new方式建立
      • Static nest Class 擁有None static Member需建立nest clas...
      • Nest Interface在member attrib視為static Nest type att...
      • 巢狀型別與外部型別存有特殊權限關係
      • 巢狀型別分為三類六種型態
    • ►  1月 (2)

關於我自己

人馬座
Cogito, ergo sum 法語原文Je pense, donc je suis
檢視我的完整簡介