hey all I found out today I needed to do a testdriver for my programme as we no it took me forever to do the programme so will some one explain the test driver to me or even help me I no this is a silly thing but im so new to java its a big learning curve for me cheers
import java.util.Random;
Public class Array
{
public static void main(String[] args)
{
Random r = new Random();
int array[] = new int[50];
int a = 0;
while (a < 50)
{
boolean foundNumber = false;
int random = r.nextInt(999);
// this does a linear search to find if the number
// is already there, and if it is, it changes the variable
for(int i = 0; i < a; i++)
{
if(array[i] == random)
{
foundNumber = true;
}
}
if(foundNumber == false)
{
array[a] = random;
a++;
}
}
int i = 0;
for(int row = 0; row< 10; row++)
{
for(int c = 0; c<=4; c++)
{
System.out.format("%03d ", array[i]);
i++;
}
System.out.println("");
}
}
}