Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
366 views
in Technique[技术] by (71.8m points)

java - Java泛型实践的挑战[关闭](Challenges for java generics practice [closed])

In my everyday coding I'm offten dealing with generics as a client (collections, etc.).

(在我的日常编码中,我不喜欢将泛型作为客户端(集合等)来处理。)

But when it comes to implementing my own rather abstract and complex generic solution, with interfaces and few layers of inheritance, it turnes out, that generics are rather complex thing, and I don't know them well enough.

(但是当涉及到实现我自己的相当抽象和复杂的泛型解决方案时,它具有接口和很少的继承层,事实证明,泛型是相当复杂的事情,我对它们还不够了解。)

So, I'd like to do some additional practice on generics, but I just can't make out from my head any really interesting challenges to solve.

(因此,我想对泛型进行一些其他练习,但是我无法从头上分辨出要解决的真正有趣的挑战。)

I try to google, but no result.

(我尝试使用Google,但没有结果。)

Could you tell me where can I find such challenges (maybe some book)?

(您能告诉我在哪里可以找到这样的挑战(也许是一本书)?)

Or please, write some interesting challenges right here - would be appreciated so much!

(或者,请在此处写下一些有趣的挑战-非常感谢!)

  ask by DmitriyS translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

In my point of view, start to write Immutable data collections in Java.

(以我的观点,开始用Java编写不可变数据集合。)

Not only do you get familiar with generics but also data collection internal implementation.

(您不仅会熟悉泛型,而且还会熟悉数据收集的内部实现。)

For instance, Queue, Stack and ... .

(例如,队列,堆栈和...。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...