Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Inner class doubt

 
Surekha Reddy
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have a doubt regarding Inner class..

Can we call a local class in a static block as an inner class??

As far as i know member classes, local classes and anonymous classes which are non-static are called inner classes. Correct me if i'm wrong.


Reagrds,
Surekha.
 
Paul Clapham
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, when you say "can we call a local class" does that mean "can my program instantiate an instance of a local class" or "can people use the name X when talking about a local class"?
 
Surekha Reddy
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Which of the following are true?

1) A static member class is also called as an inner class.
2) A non-static member class is also called as an inner class.
3) A local class in a static block is also called as inner class.
4) A local class in a non-static block is also called as inner class.

Hope my question is clear now.

Thanks in advance!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic