15.2. Enhanced for loop for Arrays and Collections

35 wyświetleń
Przejdź do pierwszej nieodczytanej wiadomości

Timm Gutowski

nieprzeczytany,
11 cze 2013, 12:26:3611.06.2013
do vog...@googlegroups.com
This is not what you want:

for (int i : array) {
System.out.println("Element at index " + i + " :" + array[0]);
}

Lars Vogel

nieprzeczytany,
17 cze 2013, 05:07:0017.06.2013
do vog...@googlegroups.com
Thanks fixed.


2013/6/11 Timm Gutowski <timm.g...@gmail.com>
This is not what you want:

for (int i : array) {
      System.out.println("Element at index " + i + " :"  + array[0]);
}

--
You received this message because you are subscribed to the Google Groups "vogella" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vogella+u...@googlegroups.com.
To post to this group, send email to vog...@googlegroups.com.
Visit this group at http://groups.google.com/group/vogella.
For more options, visit https://groups.google.com/groups/opt_out.



Odpowiedz wszystkim
Odpowiedz autorowi
Przekaż
Nowe wiadomości: 0