Hi, the java master, i have the class like this :
public class MyOwnClass
{
    String name;
    int age;

    public MyOwnClass(String name,int age)
    {
        this.name = name;
        this.age = age;
    }
}

And i add this class instance object to the HashSet object --> s
s.add(new MyOwnClass("Paris",19));

when the s object is print using iterator, why the output show like this :
[EMAIL PROTECTED]

please help me ! i'm very confuse the following code.
why when i add the object Integer ex : s.add(new Integer(8));
why the output is 8
Thanks very much.

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to