Basic HTML version of Foils prepared May 19 99

Foil 24 Indexed Properties

From Javabeans Basic Information Track Computational Science Course CPS616 -- Spring Semester 1999. by Geoffrey Fox, Nancy McCracken, Wojtek Furmanski


1 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);
2 And you can give methods to access individual values: public String getStockList (int index); public void setStockList (int index, String value);

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Mon Jul 5 1999