Java Bootcamp – Workbooks and Challenges
)}

Workbook 6.3

From the Java Bootcamp Resources, launch Workbook 6.3.

Untitled123.png

Java Grocer

In this workbook, your job is to help customers find what they're looking for.

Task 1

Create an array that stores aisles.

"apples", "bananas", "candy", "chocolate", "coffee", "tea"

Task 2

A customer is looking for coffee.

System.out.println("\nDo you sell coffee?");

Create a for loop that searches the array for the coffee aisle.

0 1 2 3 4 5 "apples", "bananas", "candy", "chocolate", "coffee", "tea"

Once you find the aisle (when your condition is true), display the following message:

System.out.println("\nWe have that in aisle: <index>");

Result

Visualizing the Runtime

After you solve this workbook, I still recommend watching the video solution on Udemy.

a6.3.png

It will show you how to visualize the runtime using Visual Studio Code.


Associated Course: The Complete Java Development Bootcamp
Related Course: The Complete Spring Boot Development Bootcamp – Become a Java Web Developer

Feedback Summary
4.7
43 students
5

91%
4

2%
3

0%
2

0%
1

7%
Written Reviews
There are no written reviews yet.