我不断收到下面指示的错误。我假设我没有正确声明它:
public class SparseMatrix {
// instance variables
private final TreeMap<Integer,TreeMap<Integer,Double>> matrix;
private final int rows;
private final int cols;
public SparseMatrix(int r, int c) {
// this gives me an error
this.rows = new SparseMatrix(r);
this.cols = new SparseMatrix(c);
} // end of constructor
}