File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

default package related query

 
Poorvika Chandra
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,

As we know it is not recommended to write classes under default package.Then what might be the purpose behind the introduction of default packages in java

Regards
Poorvika
 
Ogeh Ikem
Ranch Hand
Posts: 180
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can compile and run a class in a default package (just like any other class). The only problem is that you cannot import the default package.
 
Stephan van Hulst
Bartender
Pie
Posts: 4840
34
Chrome Netbeans IDE Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The purpose of the default package is to enable people to quickly write very small test programs or example code, without cluttering it with the package declaration.
 
Campbell Ritchie
Sheriff
Pie
Posts: 47286
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to the Ranch
 
Poorvika Chandra
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic