Javaの役割...

パラメータの同じタイプの複数の受信を表すJavaにおける役割...、

公共のボイドtestFunction(int型... ARR){//は、複数種類のパラメータを受け取るintです
    以下のための(私はint型:ARR){
        System.out.println(i「が「+);
    }
}
 
 
@テスト
ます。public void findByCategoryTypeIn(){
    testFunction(1,2,3,4,6,7)。
}
 
結果:
1
2
3
4
6
7

おすすめ

転載: www.cnblogs.com/yyywh/p/11308286.html