Java无限循环小数判定问题
public static boolean isNonterminating(){ try{ BigDecimal bigA=new BigDecimal(1); BigDecimal bigB=new BigDecimal(3); System.out.println("a/b="+bigA.divide(bigB)); return false; }catch(Exception e){ return true; }}
?于是我果断的使用了这种方法,特此记录一下,欢迎各位拍砖。。。
?