Skip to main content

Ian Wu 's Library tagged java-basic   View Popular, Search in Google

Sep
28
2010

throw new ExceptionInInitializerError(e);

在 static init 時,可以用這個來丟例外

java java-basic

Sep
13
2010

初始化 static map 的方法

"Java 5 provides this more compact syntax:

static final Map<String , String> FLAVORS = new HashMap<String , String>() {{
put("Up", "Down");
put("Charm", "Strange");
put("Top", "Bottom");
}};"

java programming java-basic

  •   down vote  
          

    Java 5 provides this more compact syntax:

      
    static final Map<String , String> FLAVORS = new HashMap<String , String>() {{
        put
    ("Up",    "Down");
        put
    ("Charm", "Strange");
        put
    ("Top",   "Bottom");
    }};
1 - 6 of 6
Showing 20 items per page

Highlighter, Sticky notes, Tagging, Groups and Network: integrated suite dramatically boosting research productivity. Learn more »

Join Diigo
Move to top