title: What is the purpose of defining a package in a Java file?
body: <p>I am a newbie and just learned that if I define say</p>
  
  <pre><code>package my.first.group.here;
  ...
  </code></pre>
  
  <p>then the Java files that are in this package will be placed under <code>my/first/group/here</code> directory.</p>
  
  <p>What is the main purpose of putting some Java files in a package? Also, if I choose to adopt this, how should I group them?</p>
  
  <p>Thank you</p>
  
  <hr>
  
  <p>EDIT: For anyone who might have the same question again, I just found <a href="http://java.sun.com/docs/books/tutorial/java/package/index.html" rel="noreferrer">this tutorial on packages</a> from Sun. </p>