3 / 4 = 0
7 / 3.0 = 2.33333
3.0 / 4.0 = 0.75
7 / 3 = 2
Example:
/* CURIOUS...*/
public class IntegerDivision {
public static void main(String[] args) {
System.out.println("Three divided by four is: " + 10/4);
}
}
输出为:
Three divided by four is: 2