The variable argument has to be the last so the compiler can work out which argument is which.
For example, say you pass
"test", "test", "test", "test"
into your function
public void someStuff(Object ... args, String a)
Java cannot work out if you want the args variable to contain 3 or 4 strings. It may be obvious to you at the time of writing but it's ambiguous.
However, when it's the other way around
public void someStuff(String a, Object ... args)
The Java compiler sees the first string, stick it into "a" and then knows that the remaining strings can be safely put into args and there is no ambiguity over the variables.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…