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" <firstname.lastname@example.org> 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
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center