how can I check if the whole array of a type Class is empty? The way I did it doesn't seem to work for me, do I need to Iterate one by one to check if it is null? That would not support my purpose of the code though.
This is the deceleration of my array.
private Item sysItem[] = new Item[10];
if (sysItem == null) {
System.out.println("No item's to display right now");
return;
}
My purpose of this above piece of code is, if the user didn't create an item, there won't be any items in the array so if the user was to display an Item from the array it should output the user saying there are no items in the array which is why I need to check if the whole array is empty or not.