Multiply First, Divide Second.

Run Settings
LanguageJava
Language Version
Run Command
class Main { public static void main(String[] args) { long one = 1; long two = 1000000000; double result1 = ( (double) one / two ) * 1000; double result2 = (one * 1000d) / two; System.out.println(result1); System.out.println(result2); } }
Editor Settings
Theme
Key bindings
Full width
Lines