import java.util.Random;

public class ZufallsArraySucheTest
{
   public static void main(String[] args)
   {
      ZufallsArraySuche suche = new ZufallsArraySuche();
      Random rnd = new Random();

      for (int i = 1; i <= 20; i++)
      {
         int z = rnd.nextInt(250)+1;
         int index = suche.getIndex(z);

         System.out.printf("Suche nach %3d -> Index: %3d", z, index);
         
         if (index == -1)
            System.out.println("(Zahl nicht im Array!");
         else
            System.out.println();
      }
   }
}