Page 1 of 1

About Question enthuware.ocpjp.v7.2.1585 :

Posted: Sun Dec 11, 2016 2:35 pm
by sir_Anduin@yahoo.de
It allows null value to be stored.
how does that work?

Re: About Question enthuware.ocpjp.v7.2.1585 :

Posted: Sun Dec 11, 2016 10:28 pm
by admin

Code: Select all

    HashSet hs = new HashSet();
    hs.add(null);
    System.out.println(hs);
Prints:

Code: Select all

[null]
HTH,
Paul.