由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - Help
相关主题
Simple questionget输出到Json
传递一个object reference,如何防止更改object?deserializer probelm.Ignore upper. Thx
请教关于使用map和fields大家写java class的时候是完全封装的么?
What's good way to pass intermediate results?spring frame work question
java 写unit test 给clover 真就是农民阿问一个Collection Update的问题
how to solve the problem: the members change by each other .Re: weird problem with hashtable--CONCLUSION
一个多线程问题Re: hashtable
发现java码工有个好处answer Re: how HashMap/Hashtable compare key?
相关话题的讨论汇总
话题: class话题: private话题: want话题: given话题: since
进入Java版参与讨论
1 (共1页)
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.
1 (共1页)
进入Java版参与讨论
相关主题
answer Re: how HashMap/Hashtable compare key?java 写unit test 给clover 真就是农民阿
[转载] Pair in java???how to solve the problem: the members change by each other .
a simple java programming question一个多线程问题
ObjectOutputStream.writeObject(Hashtable) ?发现java码工有个好处
Simple questionget输出到Json
传递一个object reference,如何防止更改object?deserializer probelm.Ignore upper. Thx
请教关于使用map和fields大家写java class的时候是完全封装的么?
What's good way to pass intermediate results?spring frame work question
相关话题的讨论汇总
话题: class话题: private话题: want话题: given话题: since