Wondering what’s the purpose of set-method attribute if the framework calls getNames() to set the names member variable?

 

So if I have …

 

Class myClass {

  private ArrayList names;

 

  public void setNames(ArrayList<String> names) {}

  public ArrayList<String> getNames() {}

}

 

 

How come Castor calls getNames() for each name it needs to add? Why not Create and ArrayList<String> and call setName()?

 

J

 

 

Reply via email to