LYCOS RETRIEVER Beta Retriever Home  |  What is Lycos Retriever?   
Array: Array Object
built 633 days ago
The following code creates the empty Array object vegetables, which is then populated through five calls to push(). Each time push() is called, a new Vegetable object is created by a call to the Vegetable() constructor, which accepts a String (name) and Number (price) object. Calling push() five times with the values shown results in the following array: [lettuce:1.49, spinach:1.89, asparagus:3.99, celery:1.29, squash:1.44]. The sort() method is then used to sort the array, resulting in the array [asparagus:3.99, celery:1.29, lettuce:1.49, spinach:1.89, squash:1.44].
Source:
Retrieves the contents of the SQL ARRAY value designated by this Array object in the form of an array in the Java programming language. This version of the method getArray uses the type map associated with the connection for customizations of the type mappings.
Source:
The following code creates an Array object letters with elements [a,b,c,d,e,f]. The array someLetters is then created by calling the slice() method on the second to last element from the end (e), resulting in an array with elements e and f.
Source:
SEARCH
MORE ABOUT