阅读背景:

在Java中访问没有公共访问者的私有成员

来源:互联网 

I've been given a challenge, that I must get value of list item at given index, from outside Queue class (items is private). I'm not allowed to modify the class, and not allowed to use Reflection. Is it possible (in a real case, I would rather create public accessor to get items value) ?I've been given a challenge, that I must get va




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: