User`s guide

4 Using MWArra y Classes
Method Description
“sharedCopy” on
page 4-53
Creates and returns a shared copy of this array.
“toString” on page
4-54
Returns a string representation of the array.
clone. This method creates and returns a deep copy of the MWArray object.
Because
clone allocates a new array, any changes made to this new array are
not reflected in the original.
The prototype for the
clone method is as fo llow s:
public Object clone()
Input Parameters
None
Exceptions
The clone method throws the following exception:
java.lang.CloneNotSupportedException
The object’s class does not implement the Cloneable in terf ace.
Example Cloning an MWArray Object
Create a clone of MWArray object A:
Object C = A.clone();
System.out.println("Clone of matrix A is:");
System.out.println(C.toString());
4-50