posted 20 years ago
You don't pass objects to packages. Classes reside in packages and are callable based on their accessibility. Once a class is called objects of this type can be created in RAM on the heap. When the next class is called out of a different package and something creates objects of that type ALL of the objects are on the same heap.
The only issue then becomes - if the class in one package has accessibility to the class in the other package then, yes, it can use any object that it has a handle on as a parameter to whatever calls it makes.
"JavaRanch, where the deer and the Certified play" - David O'Meara