// sample divisions int i = 7; int j = 2; int k = i / j; // gives 3 double d = (double) i / ( double) j; // gives 3.5 double oops = (double) ( i / j ); // gives 3.0 double shortcut = ((double) i ) / j; // gives 3.5, j is promoted to double automatically. double surprise = 1.0d / 10.0d; // gives approximately 0.1. // 0.1 is a binary repeater fraction.