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