How can i have access the name object which has the biggest capacity ?
public static void biggestCapacity (HDDs [] array){
//HDDs h = new HDDs();
int max = array[0].getCapacity();
for (int i = 0; i < array.length; i++) {
if (array[i].getCapacity()>max) {
max=array[i].getCapacity();
}
}
System.out.println(max);
}