Java Utililty Methods Array Empty Check

List of utility methods to do Array Empty Check

Description

The list of methods to do Array Empty Check are organized into topic(s).

Method

booleanisEmpty(int[] array)
is Empty
if (array == null || array.length == 0) {
    return true;
return false;
booleanisEmpty(int[] array)
is Empty
return array == null || array.length == 0;
booleanisEmpty(Object[] args)
is Empty
if (args == null || args.length < 1)
    return true;
return false;
booleanisEmpty(Object[] arr)
Returns true if arr is null or has length 0.
return arr == null || arr.length == 0;
booleanisEmpty(Object[] array)
Checks whether the given Java array is empty.
return array == null || array.length == 0;
booleanisEmpty(Object[] array)
is Empty
return getArrayLength(array) == 0;
booleanisEmpty(Object[] array)

Checks if an array of Objects is empty or null.

if (array == null || array.length == 0) {
    return true;
return false;
booleanisEmpty(Object[] array)
This method returns true if the input array is null or its length is zero.
if (array == null || array.length == 0) {
    return true;
return false;
booleanisEmpty(Object[] array)
Check if the array supplied is empty.
return array == null || array.length == 0;
booleanisEmpty(Object[] array)
Return whether the given array is empty: that is, null or of zero length.
return (array == null || array.length == 0);