HELP! * GREY=local LOCAL HTML version of Foils prepared July 10 1996

Foil 128 Methods for Vectors

From Basic Lectures on Java Language Applets Graphics Networking Trip to China and Icase Tutorial -- July 12-28 and June 10-13 96. by Geoffrey C. Fox * See also color IMAGE

Elements are created with the addElement method:
  • Order missouri = new Order();
  • orders.addElement(missouri);
The object missouri of type Order is automatically converted to an Object in vector instance orders defined on previous foil.
There are methods for indexing vectors. Like arrays, the indexing is zero-based.
  • x = v.elementAt(i);
  • v.setElementAt(x,i);
The length of the Vector can be obtained:
  • int size = v.size;



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 Tue Feb 18 1997