Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren0
Why is mr. code searching for packages in iterators???
My code gives me an error there is no package... but my iterator is not supposed to contain a package... (right?!) CODE: import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.Scanner; public class Lists{ //Arrays static ArrayList<Integer> list1 = new ArrayList<Integer>(); static ArrayList<Integer> list2 = new ArrayList<Integer>(); static ArrayList<Integer> listx = new ArrayList<Integer>(); //Iterators static Iterator<Integer> it1 = new list1.iterator(); static Iterator<Integer> it2 = new list2.iterator(); } Or see for yourself? https://code.sololearn.com/c6y8DxcY2kEN/?ref=app
3 Antworten
+ 6
static Iterator<Integer> it1 = new list1.iterator();
Remove the word "new"
+ 3
😁
0
Ahhhhh damned thanks a lot!!!!!! <3