20161202问题解析请点击今日问题下方的“【Java每日一题】20161205”查看(问题解析在公众号首发,公众号ID:weknow619)
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问题解析)