I have the following code snippet:
public class YourClassNameHere {
public static void main(String[] args) {
double x = 3 / 2 * 3;
System.out.printf("%.1f", x);
}
}
I do know that 3.0 will be printed. However, why isn't it 4.5?
I thank you for your time and clarifications in advance.