Question: This program has a very special and weird bug that is causing an IllegalArgumentException. At first, we might think: why are we getting an IllegalArgumentException

This program has a very special and weird bug that is causing an IllegalArgumentException. At first, we might think: "why are we getting an IllegalArgumentException on nextInt ? The first number is always 1 and the second number is always positive!" Using the power of debugging, we will find out just why this happens!
Using the code provided on the previous slide, and the debugger tool in Visual Studio, write the value of the value variable in each iteration of the for loop!
Question 1
SAVED
value when i ==0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!