This is the syntax sugar "varargs", which allows you to call the constructor in the following ways:
new Weatherman()
new Weatherman(98115);
new Weatherman(98115, 98072);
new Weatherman(new Integer[0]);
Under the covers, arguments are passed to the constructor as an array, but you do not need to create an array to call it.
source
share