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