Print the question Print three blank lines Print the punch line
class BadJoke { public static void main() { } }
System.out.println("Why do all submarines use Linx?"); System.out.println(); System.out.println("Because you can't open Windows under water!");
/* Program 1: Tell a joke. Programmer: Dan Bennett The purpose of this program is to amuse the user by telling a joke. */
/* Program 1: Tell a joke. Programmer: Dan Bennett The purpose of this program is to amuse the user by telling a joke. */ class BadJoke { public static void main() { // tell the joke System.out.println("Why do all submarines use Linx?"); // give the user a chance to think. System.out.println(); // Tell the punch line System.out.println("Because you can't open Windows under water!"); } }