What kind of object instantiation is this?
Hi!
I'm new to Java and I was reading up about SwingWorker when I came across this code.
Code :
SwingWorker worker = new SwingWorker<ImageIcon[], Void>() {
@Override
public ImageIcon[] doInBackground() {
final ImageIcon[] innerImgs = new ImageIcon[nimgs];
for (int i = 0; i < nimgs; i++) {
innerImgs[i] = loadImage(i+1);
}
return innerImgs;
}
What is this new <> stuff? Please tell me what it's called so I can learn about it. Or give me a link to an online tutorial.
Re: What kind of object instantiation is this?
Quote:
this new <> stuff?
That's Generics.
Go to this site: The Really Big Index
and do a Find for Generics
Re: What kind of object instantiation is this?
I found this tutorial on Generics.
Thanks Norm.
Re: What kind of object instantiation is this?