Do you mean if the decimal notation contains 0? The absolute easiest way to do this:
if (String.valueOf(x).contains("0"))
Do not forget that the number is not "in fact" contains 0 or not (except for zero itself, of course) - it depends on the base. So, β10β in decimal βAβ in hexadecimal, and β10β in hexadecimal β16β in decimal ... in both cases, the result has changed.
There may be more effective ways to test for the presence of zero in the decimal representation of an integer, but they are likely to be significantly more involved in the expression above.
Jon skeet
source share