BigDicemal;
eg:
import java.math.BigDecimal;
class Demo1 {
public static void main(String[] args) {
BigDecimal b1 = new BigDecimal("2.07");
BigDecimal b2 = new BigDecimal("1.03");
System.out.println(b1.add(b2));
}
}
PK
class Demo{
Public static void main(String[] args){
System.out.println(2.07+1.03);
}
}
|
|