FileDocCategorySizeDatePackage
ArrayClassObj.javaAPI DocExample2907Mon Apr 06 18:10:26 BST 1998None

ArrayClassObj

public class ArrayClassObj extends Object

Fields Summary
static Random
rand
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

    Integer[] a = new Integer[pRand(20)];
    prt("length of a = " + a.length);
    for(int i = 0; i < a.length; i++) {
      a[i] = new Integer(pRand(500));
      prt("a[" + i + "] = " + a[i]);
    }
  
static intpRand(int mod)

      
    return Math.abs(rand.nextInt()) % mod + 1;
  
static voidprt(java.lang.String s)

    System.out.println(s);