You are not making much sense, please post your code.
basically, as far as I understand it, what you want is something this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| class SomethingA { private int myInt;
public int getMyInt() { return myInt; }
public void setMyInt(int newInt) { this.myInt = newInt; } } class SomethingB { private SomethingA myReferenceToTheOtherClass;
public SomethingB(SomethingA other) { this.myReferenceToTheOtherClass = other;
this.myReferenceToTheOtherClass.setMyInt(666); } } |