Java tutorial
//package com.java2s; import java.util.List; public class Main { public static boolean isListSizeLessThan(List<?> list, int size) { if (isListEmpty(list)) { return true; } else { return list.size() < size; } } public static boolean isListEmpty(List<?> list) { return list == null || list.isEmpty(); } }