so I need some help in understanding this "syntax" or way of writing a for loop
for(random : random1) {
now is there a way to write this in the "easier" way what I mean is:
for(int i=0; random.lenght i++) {
I'm interested in how to "rewrite" this in this concrete example
public Merchandise findMerchandise(String name) {
Merchandise found = null;
for(Merchandise the : merchandise) {
if(the.getArticle().getName().equals(name)) {
found = the;
}
}
return found;
}