Java examples for Language Basics:Math
Find minimum of two numbers using Math.min
public class Main { public static void main(String[] args) { //from w ww . ja v a2 s. c o m System.out.println(Math.min(12,34)); System.out.println(Math.min(12.34f, 12.34f)); System.out.println(Math.min(4.3, 3.2)); System.out.println(Math.min(48,42)); } }