how to take all decimal places off of a double that are zero in java code example Example: java format double no decimal places int x = (int) y