Java Programming Practice (Beginner
Level)
Program 1: Hello World
Write a Java program that prints the text "Hello, world!" on the screen.
- Class name: HelloWorld
- Use [Link]() to display the message.
Program 2: Print Your Name and Student ID
Write a Java program that prints your full name and student ID.
- Class name: PrintInfo
- The output should look like this:
Name: Wendy Luuu
Student ID: 123456
Program 3: Print a Short Poem or Song Lyrics
Write a Java program that prints four lines from your favorite poem or song.
- Class name: PoemPrinter
- Use [Link]() for each line.
Program 4: Print a Shape Using Stars *
Write a Java program that prints a rectangle shape using asterisks *.
- Class name: ShapeBox
- The output should look like this:
Program 5: Print a Simple Menu
Write a Java program that prints a simple menu for a café.
- Class name: CafeMenu
- Include at least 3 items and an "Exit" option.
- The output should look like this:
Program 6: Print a Sample Receipt
Write a Java program that prints a simple store receipt.
Your receipt should include the store name, item name, item price, quantity, and
total amount.
- Class name: ReceiptPrinter
- The output should look like this: