Dear All,
I am very new and fresh in Java. I want to make a class of matrices.
What my code looks like:
Matrix Class :
My question is how to make a return type of Array (more than one return type?). In C I learn about pointer,,how about in java? The one I know until now is by making a array type variable also, then return it as an array also.Code:public class Matrix
{
private int[][] matrix;
public void CreateMatrix(int rows, int columns)
{
matrix = new int[rows][columns];
}
public int[][] getMatrix()
{
return matrix;
}
public void setMatrix(int[][] matrix)
{
this.matrix = matrix;
}
}
For Example :
int[][] arraycopy = matrixname.getMatrix();
Kindest Regards
