I'm writing a class to represent a matrix. I want it to look something like this:
public class matrix {
private int[][] matrix;
private double[][] matrix;
//And so on and so forth so that the user can enter any primitive type and
//get a matrix of it
}
Is this legal code, or would I have to have different variable names based on the data types that their matrix holds?