Alerts are useful to prompt useful information for the user. Following code will show an alert dialog with current time.
Java Code:
import javax.microedition.lcdui.Alert;
...
private Display display;
private Alert timeAlert;
...
  public void startApp() {
    timeAlert = new Alert("Alert!");
    timeAlert.setString(new Date().toString());
    timeAlert.setTimeout(Alert.FOREVER);    
    Display.getDisplay(this).setCurrent(timeAlert);
  }