Results 1 to 1 of 1

Thread: What is Instance, Empty Constructor ....

  1. #1
    Join Date
    Oct 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default What is Instance, Empty Constructor ....

    K I did something like this and all ok now it return the true compare value

    Code:
    public boolean equals(Object o)
    {
    System.out.println(o instanceof Moof);
    System.out.println(((Moof)o).getMoofValue());
    System.out.println(this.moofValue); //XXX
    if ((o instanceof Moof) && (((Moof)o).getMoofValue() == this.moofValue))
    {
    return true;
    }
    else
    {
    return false;
    }
    Last edited by tking88; 10-24-2009 at 03:38 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •