This Java application tells a random "Knock Knock" joke. The user is prompted to engage with the joke by typing '1' to hear the punchline.
- Run the program.
- Type '1' when prompted to hear a joke.
- The program will display a random "Knock Knock" joke.
- Java: Programming language used for the application.
- Scanner: Used for reading user input.
- Random: Used for selecting a random joke from the list.
- Copy the code into
Main.java
. - Compile the program with:
javac Main.java
- Run the program with:
java Main
Enjoy the jokes!