I have a program in Java, there is minor of all arrays:
public int minorArray(int a[]) {
int largo = a.length;
int menor = 10000;
for (int i = 0; i < large; i++) {
if (a[i] < minor)
{
minor = a[i];
}
}
return minor;
}
I have to make a test case with JUnit, to verify that I found that minor. What method would you recommend?
Aucun commentaire:
Enregistrer un commentaire