-
beginner Java package Question
Hi,
Does using the package statement add a class to an existing package when
compiled using "Javac"?
Thanks
-
Re: beginner Java package Question
"vt" <vmt007@hotmail.com> wrote:
>
>Hi,
>
>Does using the package statement add a class to an existing package when
>compiled using "Javac"?
>
>Thanks
Yes, assuming that the directory structure for your source code corresponds
to directly to the package statement (i.e. package com.something.file.*;
will include every class file with that package statement located in the
'file' directory under 'something', which is under 'com'.
-com
|-something
|-file
|-*.java files with appropriate package statement
You can now modify any of the '.java' files in the 'file' directory or add
new '.java' files, recompile the package and the new source code will be
included in the already existing package.
Happy Coding!
Cordially,
Kyle Gabhart
Devx Java Pro
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks