What is the difference between "int x = (int) x" and "x = (int) x" in java if I assign "double x = 2.3"?
if I assign "double x = 2.3", what is the difference between "int x = (int) x" and "x = (int) x" ? I’m new to java and use python before, in python, if I execute "x = 2.3; x = int(x); print(x)", x is 2. java: python: >Solution : You’re re-declaring x, so in… Read More What is the difference between "int x = (int) x" and "x = (int) x" in java if I assign "double x = 2.3"?