0
I was just wondering if a different syntax similar to "for each t in arr" is valid or not.
For each
2 odpowiedzi
+ 1
syntax to for each loop in java :
for(t:arr)
{
}
0
String arr[] = {1,2,3,4};
for(String el : arr) {
System.out.println(el + " ");
}