Java Bootcamp Resources ->
Module 1 ->
6. Arrays, open Workbook 6.3.
In this workbook, you found work at the Java Grocer. Your job is to help customers find what they're looking for.
The store has six aisles:
apples -- bananas -- candy -- chocolate -- coffee -- tea
Create an array that stores each aisle. Then, print the contents of the array using a
>>: apples >>: bananas >>: candy >>: chocolate >>: coffee >>: tea
Once that works, keep the
for loop but remove the
A customer came in and they're wondering where the coffee is.
Do you sell coffee?
for loop from task 1 to search through the array. If the element says: coffee, break the loop and print:
\nWe have that in aisle: <index>