Properties can also have arrays of values. This is called an indexed property, and has two pairs of get and set methods: for the entire array and for individual values. For example, you can have a property named StockList, which had an indexed collection of Strings as its value: public String [ ] getStockList ( ); public void setStockList ( String [ ] values); |
And you can give methods to access individual values: public String getStockList (int index); public void setStockList (int index, String value); |