import java.util.*; public class VarargMethod { void test(int p1, int p2) { List list = new ArrayList<>(); list.add(String.format("m", p1, p2)); } }