Java tutorial
//package com.java2s; //License from project: Apache License public class Main { static void checkSpeed(float speed) { if (speed <= 0f) throw new IllegalArgumentException("Speed must be >= 0"); } }