0
hi is there a loop in java called (foreach)
java
2 ответов
+ 3
not as such foreach( syntax is different ) but working is same
here is the example
// data is an array
for (int a : data) {
System.out.print(a+ " ");
}
+ 1
There is also a forEach method on the collections that takes a lambda.