TC65 JAVA User's Guide
Strictly confidential / Released
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();
}
}
TC65 JAVA User's Guide_V05
Page 36 of 90
s
26.09.2005