提示:您可在线编辑运行本教程的实例 - 运行实例,去试试!
测试实体数组是否为空。
//package com.nowjava; public class Main { /** from * NowJava.com - 时 代 Java **/ public static void main(String[] argv) { Object[] entities = new String[] { "1", "abc", "level", null, "nowjava.com", "asdf 123" }; System.out.println(isEmpty(entities)); } /** Test if entities array is empty. * * @param entities to test if it is empty. * @return true if entities array is null or entities array length is zero. */ public static boolean