0
Syntax meaning in enhanced for loop (java)
I tried to solve this case but have no clues. int[] arr= {1,2,3,4,4}; for (x: arr) { arr[x]= 0; } // doest it mean that every values in arr will be replaced with 0? thanks.
3 Answers
0
yes
0
Nah, if you print that array the result would be 0 0 3 0 0. This is where i got stuck.
0
Oh, really? In other langs that means everything is 0.