Java tutorial
//package com.java2s; //License from project: Open Source License import org.json.JSONArray; import java.util.List; public class Main { public static boolean isEmpty(List photos) { return !(photos != null && photos.isEmpty()); } public static boolean isEmpty(String str) { return str == null || "".equalsIgnoreCase(str); } public static boolean isEmpty(JSONArray obj) { return !(obj != null && obj.length() > 0); } }