摘要:
位运算-Java 记得以前用大数运算的时候也是位运算实现的,现在用位运算实现加减乘除 加法运算 a + b //a + b的和等于异或 +进位,进位为0就说明运算结束了 whlie(b != 0){ int carry = (a & b) << 1; a ^= b; b = c; } 减法运算 a 阅读全文
摘要:
Java日期 主要是对日期进行相关操作,使用到的函数是Calendar,SimpleDateFormat(非线程安全,尽量避免使用) 对日期操作:Calendar 日期转换:FastDateFormat /*实现提取前一天的日期*/ public class Main { public static 阅读全文