It makes no sense to pass a reference to the superclass of the object in the constructor. Your subclass is already an instance of the superclass.
Even if you cannot directly see the private components of the superclass, but they still exist, and calls to public access methods will still cause normal behavior.
In answer to your second question, the most efficient way to access data inside a parent class is to access this parent class. If it has get / set properties methods that populate some data structure full of properties, just call these methods from your child class and they will work exactly the same as for the parent. Now, if these internal data structures are populated with the constructor of the parent class, you will need to call this constructor with the correct methods when creating the instance of the child constructor that they need, usually by calling the corresponding super () at the beginning of the child constructor.
If you are trying to get around a restriction that you do not see in the private parts of the superclass, java intentionally does not allow you to do this. You can get around this with a reflection if you are not stuck inside a runtime environment that prohibits this, but I generally do not consider this a safe or elegant approach.
From the comment below, I understand what the OP is trying to do, and this should work, although obviously it depends on your ability to make changes to the superclass:
public class Super { public Super (Super other) {
Jim w
source share