The method
doubleIt should take a one-dimensional array
of
ints. Here is sample source code for that method:
public static void doubleMyInt(int[] i) {
i[0] *=2;
/* Derby returns the first element of the array.*/
}
Note: The return value is not wrapped in an array
even though the parameter to the method is.
Table 1. INOUT
Parameter Type Correspondence
| JDBC Type |
Array Type for Method Parameter |
Value and Return Type |
| BIGINT |
long[] |
long |
| BINARY |
byte[][] |
byte[] |
| BIT |
boolean[] |
boolean |
| DATE |
java.sql.Date[] |
java.sql.Date |
| DOUBLE |
double[] |
double |
| FLOAT |
double[] |
double |
| INTEGER |
int[] |
int |
| LONGVARBINARY |
byte[][] |
byte[] |
| REAL |
float[] |
float |
| SMALLINT |
short[] |
short |
| TIME |
java.sql.Time[] |
java.sql.Time |
| TIMESTAMP |
java.sql.Timestamp[] |
java.sql.Timestamp |
| VARBINARY |
byte[][] |
byte[] |
| OTHER |
yourType[] |
yourType |
| JAVA_OBJECT (only valid in Java2/JDBC 2.0 environments) |
yourType[] |
yourType |