• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Anonymous class

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Check all of the following statements which are true.
a) An inner class can have the same name as its enclosing class.
b) An instance of a non static inner class always has an
associated instance of the enclosing class.
c) An anonymous inner class is always assumed to extend bject.
I know that a is false and b is true.
But,shouldnt c also be true since And every class ,by default extends from Object.So anonymous class is always assumed to exetnd from Object should be true.
Thanks!

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

Originally posted by avn:
Hi,
Check all of the following statements which are true.
a) An inner class can have the same name as its enclosing class.
b) An instance of a non static inner class always has an
associated instance of the enclosing class.
c) An anonymous inner class is always assumed to extend bject.
I know that a is false and b is true.
But,shouldnt c also be true since ,every class ,by default extends from Object.So anonymous class is always assumed to extend from Object should be true.
Thanks!


 
reply
    Bookmark Topic Watch Topic
  • New Topic