Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Inner classes  RSS feed

 
Lalit Kapoor
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A non-inner class cannot cantain static variables. Why?
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you'd better rephrase that, because a non-inner class (i.e. any class that's not an inner class) can have static members to its heart's content.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!