import java.util.*; <br /> public class WrappedString { <br /> private String s; <br /> public WrappedString(String s) { this.s = s; } <br /> public static void main(String[] args) { <br /> HashSet<object> hs = new HashSet<object>(); <br /> WrappedString ws1 = new WrappedString(”aardvark”); <br /> WrappedString ws2 = new WrappedString(”aardvark”); <br /> String s1 = new String(”aardvark”); <br /> String s2 = new String(”aardvark”); <br /> hs.add(ws1); hs.add(ws2); hs.add(s1); hs.add(s2); <br /> System.out.println(hs.size()); } } <br /> What is the result?() <br /> </object></object>
A、 0
B、 1
C、 2
D、 3
E、 4
F、 Compilation fails.
H、 An exception is thrown at runtime.