- or download this
ArrayList ar = new ArrayList();
for(String item : ar) {
...
}
- or download this
ArrayList ar = new ArrayList();
for(Iterator i = ar.iterator(); ar.hasNtext(); ) {
String item = (String) i.next();
}
- or download this
my @ar ;
foreach my $item (@ar) {
...
}
- or download this
public enum int {MENU_FILE, MENU_EDIT, MENU_FORMAT, MENU_VIEW} ;
- or download this
public int MENU_FILE = 0;
public int MENU_EDIT = 1;
public int MENU_FORMAT = 2;
public int MENU_VIEW = 3;
- or download this
my ($MENU_FILE, $MENU_EDIT, $MENU_FORMAT, $MENU_VIEW) = (0..4) ;
- or download this
------------------------------------------
package com.name;
...
double value = 2 * Constant1;
...
}
- or download this
use XYZ qw(Constant1) ;
use XYZ qw(:SOMEGROUP) ;