public static boolean arrayElementsAreNull ( String [ ] uncontainedArray ) { boolean empty = true ; for ( Object ob : uncontainedArray ) { if ( ob != null ) { empty = false ; break ; } } return empty ; }
This method check if all elements of an array are null .