0

What is the meaning of the code

for(string s:c). sop(s);

19th Jun 2017, 12:34 PM
R Prathibha
R Prathibha - avatar
2 ответов
+ 1
if it's Java, then that is named "for each" but it is not written well. for (String s: arrayList){ System.out.println(s); } You shouldn't be lazy in writing the whole question. So the meaning is: you have an array or list which contains String. So you traverse the array or list, but you need a variable to store each value at a time. That variable can be named whatever you want, the purpose is to make use of the array or list values.
19th Jun 2017, 12:47 PM
Claudiu Stefan Haidu
Claudiu Stefan Haidu - avatar
0
k
19th Jun 2017, 12:52 PM
R Prathibha
R Prathibha - avatar