Help for this page

Select Code to Download


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