Java tutorial
//package com.java2s; import java.util.Locale; public class Main { static void checkAngle(int angle) { if (angle < 0 || angle > 360) { throw new IllegalArgumentException( String.format(Locale.CHINA, "Illegal angle %d: must be >=0 and <= 360", angle)); } } }