Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Help > Re: Question ab...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 20 of 20 Topic 15992 of 16078
Post > Topic >>

Re: Question about the package directive

by Lew <lew@[EMAIL PROTECTED] > Apr 22, 2008 at 09:57 PM

John W Kennedy wrote:
> I_Am_The_Walrus wrote:
>> I was reading a Java book tonight and it was talking about the
>> "package" directive.  I haven't seen it used anywhere.  Did it die
>> with one of the more recent versions or is it just obsolete but still
>> available?
> 
> Sample programs normally exist in their own tiny little worlds, where 
> using the package statement only creates clutter. Real programs use 
> packages.

In fact, there are certain things that cannot be done if you stay within
the 
default (i.e., unnamed) package.  The JLS itself admonishes:
> For small programs and casual development, a package can be unnamed
(§7.4.2) 
> or have a simple name, but if code is to be widely distributed, unique
package 
> names should be chosen (§7.7). 
<http://java.sun.com/docs/books/jls/third_edition/html/packages.html>

and

> Unnamed packages are provided by the Java platform principally for
convenience 
> when developing small or temporary applications or when just beginning 
> development.
<http://java.sun.com/docs/books/jls/third_edition/html/packages.html#7.4.2>

-- 
Lew




 20 Posts in Topic:
Question about the package directive
I_Am_The_Walrus <I_Am_  2008-04-20 00:16:35 
Re: Question about the package directive
Mark Space <markspace@  2008-04-19 18:32:50 
Re: Question about the package directive
Lew <lew@[EMAIL PROTEC  2008-04-19 23:04:34 
Re: Question about the package directive
Roedy Green <see_websi  2008-04-20 10:06:01 
Re: Question about the package directive
Roedy Green <see_websi  2008-04-20 10:07:47 
Re: Question about the package directive
xinxin <jnzhouxinxin@[  2008-04-20 04:15:07 
Re: Question about the package directive
rossum <rossum48@[EMAI  2008-04-20 13:10:01 
Re: Question about the package directive
I_Am_The_Walrus <I_Am_  2008-04-20 16:05:57 
Re: Question about the package directive
Mark Space <markspace@  2008-04-20 11:59:41 
Re: Question about the package directive
I_Am_The_Walrus <I_Am_  2008-04-21 00:33:19 
Re: Question about the package directive
Mark Space <markspace@  2008-04-20 20:29:09 
Re: Question about the package directive
I_Am_The_Walrus <I_Am_  2008-04-21 23:53:03 
Re: Question about the package directive
Roedy Green <see_websi  2008-04-24 09:55:40 
Re: Question about the package directive
Patricia Shanahan <pat  2008-04-24 06:58:43 
Re: Question about the package directive
ram@[EMAIL PROTECTED] (S  2008-04-24 13:54:37 
Re: Question about the package directive
Roedy Green <see_websi  2008-04-27 10:47:57 
Re: Question about the package directive
Lew <lew@[EMAIL PROTEC  2008-04-27 08:50:21 
Re: Question about the package directive
ram@[EMAIL PROTECTED] (S  2008-04-27 13:07:50 
Re: Question about the package directive
John W Kennedy <jwkenn  2008-04-22 14:22:56 
Re: Question about the package directive
Lew <lew@[EMAIL PROTEC  2008-04-22 21:57:26 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri May 16 7:58:58 CDT 2008.