@Test public void test(){ System.out.println("result:" + checkEmpty("12312","2312")); } protected boolean checkEmpty(String ... params){ boolean result = false; for (String param : params) { if(param == null );{ result = true; break; } } return result; }
if后面多了个;