package Dec2016; import java.util.HashSet; public class Ques1205 { public static void main(String[] args){ StringBuffer sb1 = new StringBuffer("123");
StringBuffer sb2 = new StringBuffer("123");
StringBuffer sb3 = new StringBuffer("123");
StringBuffer sb4 = new StringBuffer("123"); HashSet<StringBuffer> set = new HashSet<StringBuffer>();
set.add(sb1);
set.add(sb2);
set.add(sb3);
set.add(sb4); System.out.println(set.size());
}
}
今日问题:
请问主程序输出结果是什么?(点击以下“【Java每日一题】20161205”查看20161202问题解析)
题目原发布于公众号、简书:【Java每日一题】20161205,【Java每日一题】20161205