Here you can find the source of arrayHasContent(Object[] array)
Parameter | Description |
---|---|
array | the array |
public static boolean arrayHasContent(Object[] array)
//package com.java2s; // compliance with the InfoGrid license. The InfoGrid license and important public class Main { /**//from w ww .j a v a 2s .com * Helper method to determine whether an array has any content. * * @param array the array * @return true if the array is non-null and has a length other than 0 */ public static boolean arrayHasContent(Object[] array) { if (array != null) { for (int i = 0; i < array.length; ++i) { if (array[i] != null) { return true; } } } return false; } }