• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Container methods

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think C is the correct answer.
 
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
reply
    Bookmark Topic Watch Topic
  • New Topic