Java tutorial
//package com.java2s; public class Main { static void assertUserIdValid(String userId) throws IllegalArgumentException { if (userId == null || userId == "") { throw new IllegalArgumentException("API key is invalid"); } } }