java basis: + - * /

 

add: add

subtract: minus

multiply: Take

divide: In addition to

 

. The System OUT .println ( new new the BigDecimal ( " 2 " ) .divide ( new new the BigDecimal ( " 10 " ))); // calculate 
the System. OUT .println ( 2 / 10 ); // get commercially 
. The System OUT .println ( 2 % 10 ); // take the remainder 

results:
  0.2
  0
  2

  

 

Guess you like

Origin www.cnblogs.com/xiaohuizhenyoucai/p/11356220.html