What do 3 dots next to a parameter type mean in Java?

前端 未结 12 1713
灰色年华
灰色年华 2020-11-22 00:27

What do the 3 dots following String in the following method mean?

public void myMethod(String... strings){
    // method body
}
12条回答
  •  囚心锁ツ
    2020-11-22 00:31

    Just think of it as the keyword params in C#, if you are coming from that background :)

提交回复
热议问题