灰色的灵魂

黑夜给了我黑色的眼睛, 而我注定要用它来寻找美金

灰色的灵魂 header image 2

singleton pattern

November 22nd, 2004 · No Comments · Tech

Class Soup{
private Soup(){}
private static Soup ps1 = new Soup();
public static Soup access(){
return ps1;
}
public void f(){}
}

public class Lunch{
void test(){
Soup.access().f()
}
}

Tags:

No Comments so far ↓

There are no comments yet...Kick things off by filling out the form below.

Leave a Comment