本帖最后由 hamiguadjs 于 2014-5-26 23:28 编辑
- public static void main(String[] args) {
- StringBuffer buffer = new StringBuffer("hello");
- System.out.println(buffer);
- StringBuilder builder = new StringBuilder("hello");
- System.out.println(builder);
- String s = "hello";
- System.out.println(s);
- System.out.println(s.equals(buffer));
- System.out.println(builder.equals(buffer));
- }
复制代码
在以上的代码中,大家先猜猜结果是什么?
|
|