> 6.3 | Hello World MIDlet

> Here is a sample HelloWorld program.

> /** * HelloWorld.java */ package example.helloworld; import javax.microedition.midlet.*; import java.io.*; public class HelloWorld extends MIDlet { /** * HelloWorld - default constructor */ public HelloWorld() { System.out.println("HelloWorld: Constructor"); } /** * startApp() */ public void startApp() throws MIDletStateChangeException { System.out.println("HelloWorld: startApp"); System.out.println("\nHello World!\n"); destroyApp(); } /** * pauseApp() */ public void pauseApp() { System.out.println("HelloWorld: pauseApp()"); } /** * destroyApp() */ public void destroyApp(boolean cond) { System.out.println("HelloWorld: destroyApp(" + cond + ")"); notifyDestroyed(); } }