← Back to Week 1 Hub

Shopping List

Create a program that prints your personal shopping list

Workbook 1a, p.26 — Project name: shopping-cart

In Plain English

Create a program that prints out your personal shopping list. Each item goes on its own line. That's it — no user input, no calculations, just printing.

Your list should have at least 10 items. You can pick any items you want — groceries, school supplies, whatever you'd actually buy.

What a Successful Run Looks Like

Example Console Output

My Shopping List: - Apples - Bananas - Bread - Milk - Eggs - Rice - Chicken - Pasta - Tomatoes - Orange Juice - Cereal - Cheese
Note: This is just an example. Pick your own items — your output will look different, and that's the point. The format (one item per line) is what matters.
What This Exercise Practices

This exercise reinforces these concepts from Week 1:

Why this matters: Every Java program you write this semester will start the same way — create a project, write a class, add a main method. This exercise locks in that muscle memory before things get more complex.
Flow Diagram
Step 1 Create class ShoppingList.java
Step 2 Add main method public static void main
Step 3 Print each item System.out.println()

This is your very first Java exercise. Take your time setting up the project — that's half the learning.

VariableApp + Receipt →