Java tutorial
//package com.java2s; public class Main { static void checkColors(int[] colors) { if (colors == null || colors.length == 0) { throw new IllegalArgumentException("You must provide at least 1 color"); } } }