对于集合类,如List ,在用get 和set 时,应该如下: private List args = new ArrayList(); public List getArgs() { return args; } public void addAgr(String arg){ }