utilities
Class ChangeArrayLength
java.lang.Object
|
+--utilities.ChangeArrayLength
- public class ChangeArrayLength
- extends java.lang.Object
Method Summary |
static java.lang.Object[] |
changeLength1D(java.lang.Object[] a,
int newLength)
|
static java.lang.Object[] |
changeLength1D(java.lang.Object[] a,
int n,
int newLength)
Change the length of the 1D array a. |
static void |
main(java.lang.String[] args)
test program |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ChangeArrayLength
public ChangeArrayLength()
changeLength1D
public static java.lang.Object[] changeLength1D(java.lang.Object[] a,
int n,
int newLength)
- Change the length of the 1D array a.
- Parameters:
n
- number of elements in anewLength
- new length of array- Returns:
- array of length newLength with a[0:n-1] copied into it
changeLength1D
public static java.lang.Object[] changeLength1D(java.lang.Object[] a,
int newLength)
main
public static void main(java.lang.String[] args)
- test program