• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

RHE and inner classes

 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everybody!
Definition of declaration context of local and anonimous classes differ in Flanagan "Java in nutshall" from Mughal.
In first described that local and anonimous classes can not be static but Mughal said that they could be in static context.
I just wondering what written about this in RHE?
Quote about this will be highly appreciated.
Thanx in advance
 
Ranch Hand
Posts: 1070
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think they are differing. I think the first one says that local and anonymous classes cannot be static, which is true. And the second one says while the inner class (local and anonymous) cannot be static, they can be created in static methods.
Bill
 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Vladimir Kositsky:
Hi everybody!
Definition of declaration context of local and anonimous classes differ in Flanagan "Java in nutshall" from Mughal.
In first described that local and anonimous classes can not be static but Mughal said that they could be in static context.
I just wondering what written about this in RHE?
Quote about this will be highly appreciated.
Thanx in advance


ya, i think bill is right.
hi, Vladimir
plz pay attention to understand the actuall meaning of "static context". bill give you an explaination.
 
Vladimir Kositsky
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bill, George
Thank for answer
Mughal definetly using statements as static local or anonymous classes, meaning static by context.
Again , there is no unification in inner classes terminology.
In purpose of SJPC exam what will be an answer for question of existance of static anonymous innner classes?
According to Mughal is "true".
If there is any ambiguity in Mughal book, so that is only one.
 
reply
    Bookmark Topic Watch Topic
  • New Topic