// finding the smallest of three ints int smallest = Math.min( Math.min( a, b ), c ); // also works with long, float and double e.g. double smalleestDouble = Math.min( Math.min( aDouble, bDouble ), cDouble );