1 d arrays :: linear search


  public static void main (String[] args)
  {
    int a [] = {12, 6, 3, 88, 9, 132, 12, 456, 906};

    int largest = a[0];//start at first element 
     
    for (int i = 1 ; i < a.length; i++)//initialize clv to 1
    {
      if ( a[i] > largest )//if next element is greater..
      {
        largest = a[i] ;//..switch 
      }
         System.out.println (largest);      
    }
  }