Study Display 5.9 and then write a program such that
1. an object variable aObject of class ToyClass holds the content of ("Mrs. Smith",1)
2. another object variable bObject of class ToyClass also holds the content of ("Mrs. Smith",1)
3. the other object variable cObject that have the same reference as aObject
4. Test whether aObject == bObject, meaning the two have the same reference.
5. Test whether aObject.equals(bOject), meaning the two hold the same content.
6. Test whether aObject == cObject
7. Test whether aObject.equals(cOject)
6 則留言:
s9126218 finished the lab.
s9126107 finished the lab.
s9026104 did
s9126359 finished
s9014104 finished the lab ^^
done
張貼留言