beginner Java package Question
Does using the package statement add a class to an existing package when
compiled using "Javac"?
Re: beginner Java package Question
"vt" <email@example.com> wrote:
>Does using the package statement add a class to an existing package when
>compiled using "Javac"?
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'.
|-*.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.
Devx Java Pro
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