Workbook 6.7
From the Java Bootcamp Resources
, launch Workbook 6.7
.
Task 1
Inside the workbook, an array stores Java's fight record.
String[] record = {"WIN", "WIN", "WIN", "LOSS", "WIN", "WIN", "LOSS"};
Use a for
loop to count the number of wins, and update the following variable.
int wins = 0;
Use a for
loop to count the number of losses, and update the following variable.
int losses = 0;
Result
Print your results.
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.