Java Bootcamp – Workbooks and Challenges
)}

Workbook 6.7

From the Java Bootcamp Resources, launch Workbook 6.7.

7.png

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.

a36dcd41-c71f-4317-aca6-87c10732c0b3.png

Visualizing the Runtime

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

a6.7.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.