java cast string to int cut or round code example Example: java format double no decimal places int x = (int) y