场景:
List findByExample(T exampleInstance, String... excludeProperty);
JDK5新特性之一
String... excludeProperty表示不定参数,也就是调用这个方法的时候这里可以传入多个String对象
使用实例:
public class Main { public static void main(String[] args) { //测试,传入多个参数 test("hello", "world", "13sd", "china", "cum", "ict"); } public static void test(String... arguments) { for (int i = 0; i < arguments.length; i++) { System.out.println(arguments[i]); } } }