摘要:
一.Date类 1 一些主要的方法: 2 public class DateTest { 3 public static void main(String[] args) throws ParseException { 4 Date date = new Date(); 5 //输出当前时间 6 S 阅读全文
摘要:
可变字符串: StringBuffer:线程安全,效率低 StringBuilder:线程不安全,效率高 二者的api相同,区别就是StringBuffer定义的方法中加入了synchronized关键字 1 public class StringBufferDemo { 2 public stat 阅读全文
摘要:
一.包装类与基本数据类型比较 1 public class IntegerDemo { 2 public static void main(String[] args) { 3 4 int i = 10; 5 Integer ii = 10; 6 System.out.println(i == ii 阅读全文