Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy is varargs always the last parameter in a method signature?
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COIf thats not the way, then in the method usage, how can the compiler find out where the varargs end and next method arg begins?
      singulars
    2. COThe varargs can be distinguished by first identifying the non-varargs and taking the rest as the varargs irrespective of whether they appear at the start or the end. Currently if there are five arguments with the last one as varargs then it is resolved as whatever comes after the fourth is the varargs. This can be reversed also like if there are five arguments with the first as varargs, resolve from end to start, like the last four are normal and whatever is there excluding the last four are part of the first vararg :) I think it's just implemented this way since there is no real need till now
      singulars
    3. COSee the interview with `C family of language` creators here [ C Family Interview](http://www.gotw.ca/publications/c_family_interview.htm) where Gosling says "I had this personal rule that by and large I didn't put anything in just because I thought it was cool. Because I had a user community the whole time, I'd wait until several people ganged up on me before I'd stick anything in. If somebody said, "Oh, wouldn't that be cool," by and large I ignored them until two or three people came up to me and said "Java ought to do this." Then I'd start going, well, maybe people will actually use it."
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload