Author Topic:   Container methods
Anju Rao
ranch hand
posted March 07, 2000 08:10 PM         

Following is also a question from the Barry Boone's test.

To determine if u can invoke addContainerListener() for a component referenced using a variable named c, which expression(s) can u evaluate that will give u a true or false answer to this questions? select all valid answers.
a) c== container
b) c.equals(Class.Container)
c) c instanceof Container
d) c instanceof Component
e) c implements Container

No clue.

Venus
unregistered
posted March 08, 2000 03:48 AM           
I think C is the correct answer.

maha anna
bartender
posted March 08, 2000 09:16 AM             
a) c== container //NO (same expln as for ans b) )
b) c.equals(Class.Container) //NO , (first ,syntactically WRONG..)
c) c instanceof Container //YES
d) c instanceof Component //NO ,Container is a Component,BUT all Components are NOT Container
e) c implements Container //NO ,Container is a NORMAL CLASS
regds
maha anna

|