Java double Example

Have you ever met the situation that you get an integer but you really want a double? For the following method, devide(2,3) will return 0.0. public static double devide(int x, int y){ return x/y; }public static double devide(int x, int y){ return x/y; } The problem is that x/y does int division. If you want … Read more