I saw this code in one of the tutorials. There isn't any error with it, but I just don't understand the code. Could someone guide me?
int trying[] = {3,4,5,6,7};
change (trying);
for(int y: trying) {
System.out.println(y);
}
}
public static void change (int x[]) {
for ( int counter = 0; counter < x.length ; counter++){
x[counter] += 5;
}
}
Able to explain this part for me?
for(int y: trying) {
System.out.println(y);
}
I don't understand especially this line of code:
for (int y : trying)