0
Can some one tell me what is : in java
Array
4 Answers
+ 4
It is called foreach loop when you used it on for loops like:
String[] arr= {"python" , "Ruby", "Java", "c#"} ;
for(string x:arr) {
System.out.println(x);
}
Output:
python
Ruby
Java
c#
Which is equivalent to
for(int i=0;i<=arr.length-1;i++){
System.out.print(arr[i]);
}
and it is also equivalent to
//Java 8
arr.ForEach(System.out::println);
+ 3
You have just started with your tutorial, it will all come very soon! Best and easiest would be you were patient until then.
This is the part about arrays in your tutorial.
https://www.sololearn.com/learn/Java/2148/
0
You have just already said it by your own words! đ : = in