Limited access

Upgrade to access all content for this subject

A programmer is testing his new method which is looping through an array of integer values and performing some calculations. Several variables are being used and the method is fairly complicated.

Which of the following are effective strategies to help the programmer debug this code?

I. Temporarily place System.out.println() statements in the code to print variable values.

II. If available, activate and use the debugger in your Integrated Development Environment.

III. Comment out statements that appear to be causing issues to see what happens without them.

A

I only.

B

II only.

C

I and II only.

D

II and III only.

E

I, II, and III.

Select an assignment template