1. public class test extends MIDlet  
  2. {  
  3.    public test()//构造函数  
  4.    { }   
  5.    protected void destroyApp(boolean arg0) throws MIDletStateChangeException   
  6.    {//当程序结束时,此方法被系统自动调用,可以在此添加释放资源的代码 }   
  7.    protected void pauseApp()  
  8.    {//当被呼叫或其他原因而使程序暂停时,此方法被系统自动调用 }   
  9.    protected void startApp() throws MIDletStateChangeException   
  10.    {//当本程序开始运行时,此方法被系统自动调用 }   
  11. }