I am new to Java. creating calculator which calculates number from user input. I have 2 Jtextfield in my application where user input numbers. For example in first field user input 45678.230 and in second field 23214.210 which gives me subtraction result is 22464 but everything i want is full result followed by .(dot) so my answer should be 22464.02
String n1opn = n1open.getText();
String n1clsd = n1close.getText();
double n1intopen = (int) Double.parseDouble(n1opn);
double n1intclose = (int) Double.parseDouble(n1clsd);
double n1ltr = n1intclose - n1intopen;
System.out.println("output "+ n1ltr);