List的getter和setter

时间:2015-02-17 17:11:51

标签: java list setter getter

class MipRequest{

    private List<String> MipIDs=null;   

    public List<String> getMipIDs() {       
        return MipIDs;  
    }   

    public void setMipIDs(List<String> mipIDs) {
        MipIDs = mipIDs;
    }

}

我如何调用get函数?

1 个答案:

答案 0 :(得分:0)

您可以使用对象实例调用它,如:

MipRequest mipRequest = new MipRequest();
//set list...
List<String> mipIds = mipRequest.getMipIDs();
//further business logic