SOURCE CODE:
Double a, b, c;
a = Double.parseDouble(txt1.getText());
b = Double.parseDouble(txt2.getText());
c = a + b;
txt3.setText(""+c);
}
SAMPLE OUTPUT:
1.234 + 1.23 = 2.464
PROBLEM:
How to round off that sum 2.464 as 2.46?
Will I put ".2f"?