1.
//判断奇偶数
public static boolean isOdd(int i){
return i % 2 != 0;
}
2.
//减法精确
public static BigDecimal jian(String s1,String s2){
BigDecimal jian=new BigDecimal(s1).
subtract(new BigDecimal(s2));
return jian;
}
3.
//长整除算法
public static void chu(){
final long MICROS_PER_DAY = 24L*60*60*1000*1000;
final long MILLIS_PER_DAY = 24L*60*60*1000;
System.out.println(MICROS_PER_DAY/MILLIS_PER_DAY);
}
时间: 2024-10-09 19:45:33