开发者

What does <ClassName> represent in Java?

开发者 https://www.devze.com 2023-03-09 00:39 出处:网络
I\'m new to Java development and I would like to know what does this statment represent: private A开发者_JAVA技巧rrayList<Drawable> images;

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

精彩评论

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