开发者

What does <ClassName> represent in Java?

I'm new to Java development and I would like to know what does this statment represent:

private A开发者_JAVA技巧rrayList<Drawable> images;

to new images ArrayList, with this Drawable something?

Thanks to all.


These are generics. images is an ArrayList containing Drawable instances. You must always put Drawables (or subclasses of Drawable) inside the images list and you will always get Drawables back.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜