Note that x is a varargs parameter. Inside the method it will look like an array (an int, to be precise). When you call the method without any arguments, x will be an array of length 0. The method will then do nothing, because there's nothing to loop over.
I don't know if you come from a C++ background or not. In that language, you CAN set a default value for a parameter.
However, Java is not C.
The compiler considers this to be legal because it knows that the only time this method runs is when it's called by some other method - which must provide a value. the way the language is designed, if they do call it with "foo()", Java will supply an empty array - which is still something.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors