I have a feeling this is something fundamental I missed... but how can I get an operation such as 1/2 to return 0.5?
Right now all I get is 0.0. Example:
public class NumberProblem { /** * @param args */ public static void main(String[] args) { double result = 1/2; System.out.println(result); } } Output = 0.0
Is there a formatting operation that has to be done?