Issue in updating elements in multidimensional vector in java?

I am trying to update elements in 2D Vector(in fact I am creating a ((n*n) xn) matrix ) based on a condition which I will mention in the sample code.

Here is the sample code.

  public class TestMatrix{
     private Vector<Vector<Integer>> matrix = new 
                                      Vector<Vector<Integer>>();
     public void matrixUpdate(){
        int n = 9;
        Vector<Vector<Integer>> tmpMatrix = new 
                                         Vector<Vector<Integer>>();
        for(int i=0;i<n;i++) tmpMatrix.addElement(-1);  // initialize 
                                                      //tmpMatrix
        for(int j=0;j<n*n;j++){
                 marix.addElement(tmpMatrix);
        }  // initialize matrix
        for(int i=0;i<n*n;i++){
            for(int j=0;j<n;j++){
               int a=i/n; 
               int b=i%n;
               int c=j;
               System.out.print("r"+a+"r"+b+"r"+c+"t");
               //condition for updating elements
               if(a==b){
                 matrix.get(i).set(j,-1);
                 continue;
               }
               if(b==c){
                 matrix.get(i).set(j,-1);
                 continue;
               }
               if(a==c){
                 matrix.get(i).set(j,-1);
                 continue;
               }
               matrix.get(i).set(j,99);
            }
            System.out.println(matrix.get(i));
        }
        for(int i=0;i<(n*n);i++){
            System.out.println(matrix.get(i));
        }
    }

    public static void main(String[] args){
      TestMatrix testMatrix = new TestMatrix();
      testMatrix.matrixUpdate();
    }
  }

You can run the above code and check for yourselves. As per the output that I got it is not what I am expecting.

Any help is appreciable. Better implementation of the above logic is deeply appreciable.

Cheers.