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