double num = 4.333; int round_up = Math.ceil(num); //round up //Console will return: round_up will be 5 int round_down = Math.floor(num); //round down //Console will return: round_up will be 4