Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java ... operator

In Filthy Rich Clients this code is presented:


public ImageLoadingWorker(JTextArea log, JPanel viewer, String... filenames) {}

What exactly does ... mean?

like image 213
farm ostrich Avatar asked Feb 14 '11 00:02

farm ostrich


2 Answers

It's used for variable arguments.

like image 94
andri Avatar answered Oct 10 '22 04:10

andri


It means all parameters passed to ImageLoadingWorker starting with the third one can be accessed using a String array called filenames.

like image 36
ClosureCowboy Avatar answered Oct 10 '22 03:10

ClosureCowboy