posted 19 years ago
But C option states that obj is an instance of B and obj is not an instance of D.
What about obj being an instance of A.
Even in that case obj instanceof B will return true. But the question mentions that obj must have been created by instatiating B and not A,C,D.
But with C option we can't be sure if obj was created from A or B.
Edited by Corey McGlone: Removed lengthy line of CODE to preserve formatting.
[ June 23, 2004: Message edited by: Corey McGlone ]