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 Drawable
s (or subclasses of Drawable
) inside the images
list and you will always get Drawable
s back.
精彩评论