// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
public class TwoDim {
   public static void main(String[] args) {
      String[][] s = new String[3][];
      for(int i = 0; i < s.length; i++) {
         s[i] = new String[i+1];
         for(int j = 0; j < s[i].length; j++) {
            s[i][j] = Integer.toString(i+j);
         }
      }
      for(int i = 0; i < s.length; i++) {
         for(int j = 0; j < s[i].length; j++) {
            System.out.print(" " + s[i][j]);
         }
         System.out.println();
      }
   }
}
