I need help to check if my array is full or if I can fit more in there. I thought I could check if just one of the positions was empty by doing the following:
for (int i =0; i <array.length; i++){
if(array[i] == null){
return false;
}else{
return true;
}
}
To test this I created am array with int and got the error: The operator == is undefined for the argument type(s) int, null is there another way I can do this? In my original task I will do this with objects and not int, does this mean it will work with objects but not with int?