Workbook 6.4
From the Java Bootcamp Resources
, launch Workbook 6.4
.
Task 1
Use Scanner
to pick up the user's response. Store the response in a String
variable.
>>: Welcome to Java Grocers.
>>: What can I help you find?
Task 2
Using the for
loop, check every element in the array.
0 1 2 3 4 5 "apples", "bananas", "candy", "chocolate", "coffee", "tea"
If there is a match, break the loop and print the aisle (index) that they're looking for.
Aside from adding interactivity, the code should be identical to Workbook 6.3.
Visualizing the Runtime
After you solve this workbook, I still recommend watching the video solution on Udemy.
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.