Instance最近在看小游戏代码,看到贪吃蛇游戏代码的时候看到这样的声明(类名为SnakeMIDlet)
class SnakeMIDlet extends MIDlet{ static SnakeMIDlet instance; ...... public SnakeMIDlet(){ instance = this; } ...... ....}