24 lines
589 B
Java
24 lines
589 B
Java
/*
|
|
* File: HelloDialog.java
|
|
* ----------------------
|
|
* This program displays the message "hello, world" and is inspired
|
|
* by the first program "The C Programming Language" by Brian
|
|
* Kernighan and Dennis Ritchie. This version displays the message
|
|
* in a dialog box.
|
|
*/
|
|
|
|
import acm.program.DialogProgram;
|
|
|
|
public class HelloDialog extends DialogProgram {
|
|
|
|
public void run() {
|
|
println("hello, world");
|
|
}
|
|
|
|
/* Standard Java entry point */
|
|
/* This method can be eliminated in most Java environments */
|
|
public static void main(String[] args) {
|
|
new HelloDialog().start(args);
|
|
}
|
|
}
|