As answered, it becomes double hence the format. To print the closest int/long
value, better to use Math.round()
function as :
System.out.println(Math.round(100*1.1));
This becomes important when you are multiplying with more precise numbers e.g.
System.out.println(Math.round(100*1.199)); //--> prints 112
System.out.println((int)(100*1.199)); //--> prints 111