-2
for(sudoku.get((int)(0)).doubleValue(); == sudoku.get((int)(1)).doubleValue();) {  
    sudoku.remove((int)(1)); 
    Sudoku.add(Double.valueOf(SketchwareUtil.get random((int)(1)), 
((int)(9))));  
}  

The error wants me to remove the "==" in the condition. This is the first time I have tried to use "for" for something that isn't a repeat a set amount of time.

  • since you're just using the condition part of the for loop you could just use a while loop instead. I would recommend reading about the different types of loops available in Java - they are pretty standard across similar programming languages. – krsteeve Nov 13 '18 at 17:40

1 Answers1

0

I think that there is small typo mistake in semicolon :

for(; sudoku.get((int)(0)).doubleValue() == sudoku.get((int)(1)).doubleValue();) {  
    sudoku.remove((int)(1)); 
    Sudoku.add(Double.valueOf(SketchwareUtil.get random((int)(1)), 
((int)(9))));  
}  
Badran
  • 515
  • 1
  • 7
  • 21