yes, but the member variable
retailPrice itself is
private. That means that you cannot access it directly outside the class in which is defined. Call the getter instead of accessing the member variable directly:
See:
Controlling Access to Members of a Class
But you've changed what you are doing from the original problem that you had, for which Junilu proposed a solution: implement a toString() method in class PackageBean.