List Class

The List class is a sub-class of the String class, so it inherits all methods of the String class. In addition, it contains methods used to add and locate elements in a list. A list can be thought of as a set of elements, represented in a single delimited string (e.g., "a,b,c").

All methods of the List class accept a delimiter parameter. When this parameter is not supplied, it defaults to a comma.

Ancestor

String

Descendants

None

Methods

Description

add

Adds an element to the list.

contains

Indicates whether a specified element occurs in the list.

count

Returns the number of elements in the list.

position

Returns the position of the element within the list.

sort

Returns a sorted version of the list.