This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

public declaration

 
John Spindler
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need some understanding... I was under the impression that you could only have one public class declaration in any one class. However I now know that you can have a public class and a public static class declaration....This is rather confusing to me.. anyone want to shed some light as to why this is.?
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The public static class would be a class inside the public top-level one, so it doesn't count. It's not like you can rip a nested class out into its own file.
The rule only applies to Top-Level not nested classes.
[ March 14, 2002: Message edited by: Cindy Glass ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic