File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Top Level Classes

 
Dale DeMott
Ranch Hand
Posts: 515
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simple question. What access modifiers can the top level class have. My book says only public, but my compiler allows friendly as well. And does a top level class simply mean that it isn't an inner class?
------------------
By failing to prepare, you are preparing to fail.
Benjamin Franklin (1706 - 1790)
 
Bosun Bello
Ranch Hand
Posts: 1510
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are correct. A Top-Level class usually means a non-inner class. The access modifiers (If any) can only be public. The modifier can be left of, in which case it's consideres package or friendly access.

Bosun
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic