java if amount doren't have decimals remove them code example Example: java format double no decimal places int x = (int) y