c*******n 发帖数: 112 | 1 Is there anyone wanting to help me on following question?
Class A{
private Hashtable d;
B b;
public void aaa{
b.ccc();
}
}
Class B
{
}
Given a variable f in B, I want A return d.get(f) to B. How can I do it? Since
d is a private member (a feature) of A, I do not want to send it to B. | r*****l 发帖数: 2859 | 2 Standard Java way is to use getter and setter.
【在 c*******n 的大作中提到】 : Is there anyone wanting to help me on following question? : Class A{ : private Hashtable d; : B b; : public void aaa{ : b.ccc(); : } : } : Class B : {
| c*******n 发帖数: 112 | 3 could you please make it clearer, thx
【在 r*****l 的大作中提到】 : Standard Java way is to use getter and setter.
|
|