Java foreach.

Java — Tags :, , — admin @ 17:36

Java 5 got a bit closer to its twin C# by adding the possibility of directly accessing entities of a list or collection through its own “foreach” functionality :

C# :

  1. foreach(type var in arr){
  2.   // implement body
  3. }

Java :

  1. for (type var : arr) {
  2.     // implement body
  3. }

0 Comments »

Pas encore de commentaire.

Flux RSS des commentaires de cet article. TrackBack URI

Laisser un commentaire

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
(c) 2012 Random namespace | powered by WordPress with Barecity