|
When a class has public constructor, any Java class that can
access the class, can access the constructor as well 
and create instances of that class. In listing 3.21, class Product has a public
constructor.
In this example, the class Tester from another package can access the public constructor of Product to create the objects of the Product class.