// finding the bigger of three ints int biggest = Math.max( Math.max( a , b ), c ); // also works with long, float and double e.g. double biggestDouble = Math.max( Math.max( aDouble, bDouble ), cdouble );