I've got the following class:
public class Matriz
{
...
static public void create(Matriz a, Matriz b)
{
...
a=new Matriz(someValue,anotherValue);
b=new Matriz(someValue,anotherValue);
...
}
}
And in my main method:
public static void main(String[] args)
{
Matriz a=null,b=null;
Matriz.create(a,b);
//these are null
a.print();
b.print();
}
The point of my method create() is to "return" two Matriz objects. How could I do this?