This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design 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
Pie
Posts: 20966
31
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic