题目内容
import java.util.*; public class WrappedString { private String s; public WrappedString(String s) { this.s = s; } public static void main(String[] args) { HashSet hs = new HashSet(); WrappedString ws1 = new WrappedString(”aardvark”); WrappedString ws2 = new WrappedString(”aardvark”); String s1 = new String(”aardvark”); String s2 = new String(”aardvark”); hs.add(ws1); hs.add(ws2); hs.add(s1); hs.add(s2); System.out.println(hs.size()); } } What is the result?()
查看答案
搜索结果不匹配?点我反馈