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