It is implemented at compile time level. You method is compiled to bytecode as
varargs method(I[Ljava/lang/String;)V
...
which is equivalent to
void method(int x, String[] args) {
...
with varargs
flag.
And
method(4, "Hello", "World!");
is compiled as
method(4, new String[] {"Hello", "World!"});