Импти для массивов
arr = new int[0];
if (arr.length == 0) {
System.out.println("array is empty");
}
Misty Markhor
arr = new int[0];
if (arr.length == 0) {
System.out.println("array is empty");
}
Object arr[] = new Object[10];
boolean empty = true;
for (int i=0; i<arr.length; i++) {
if (arr[i] != null) {
empty = false;
break;
}
}
int arr[] = null;
if (arr == null) {
System.out.println("array is null");
}