Question: for(int i=0; i < STRUCTURE_SIZE; i++) // add elements list.addFirst(array[i]); int mark = 1000; for(int i=0; i < STRUCTURE_SIZE; i++) { if(i==mark) { System.out.println( (mark/500)

for(int i=0; i < STRUCTURE_SIZE; i++) // add elements list.addFirst(array[i]); int mark = 1000; for(int i=0; i < STRUCTURE_SIZE; i++) { if(i==mark) { System.out.println( (mark/500) + "% completed"); mark += 1000; } if(!list.remove(scrambled_array[i])) System.out.println("Failure in remove, returned false"); if(list.contains(scrambled_array[i])) System.out.println( "Failure in contains, found an element that was removed."); }

line: if(!list.remove(scrambled_array[i])) showing me error: The operator ! is undefined for the argument type(s) Integer

Any help what it is?

Note: When I try to cast if(!list.remove(scrambled_array[i])) and add if(!list.remove((Integer)scrambled_array[i])) it still showing me the same error.

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!