Fix four mistakes

  • 8
  • Locked
  • Homework
This code has four bugs, and your task is... Yeah, you already know what your task is. First of all, you need to figure out what the code does. Create something and fix the bugs that were written before you got involved with the code (as well as any that appear after you get involved).
You can't complete this task, because you're not signed in.
  • Popular
  • New
  • Old
You must be signed in to leave a comment
VishnuLevel 19 , Richardson
9 August, 10:34
HI My code if working fine in Intellij, what is wrong in it ?
AhmedLevel 19 , Amsterdam
26 May, 11:09
I think there is a bug in the validation. Because it gave me and error when I used the for each loop. When I changed it to the normal loop (same result) the validation succeeded!
RomanLevel 41
27 May, 08:18
Give me your code, please. I'll check it.
AhmedLevel 19 , Amsterdam
27 May, 10:17
change the printListValues method from using the normal loop to the for each loop This works
for (int i = 0; i < list.size(); i++) {
But this should also work! But It doesn't
for (Number num : list) {
RomanLevel 41
28 May, 09:33
Look at the condition: 4. Find the block of code that uses a for loop to display the contents of the list, and move it to the printListValues ​​method. w/o changing...
AhmedLevel 19 , Amsterdam
28 May, 10:37
Ok, fair enough. But I still think it should work in both cases :-)