Does anyone know how to construct following matrix in Java?

![matrix](https://i.stack.imgur.com/X4smH.png)

I can see a transpose pattern but I might be on the wrong track with that. This is what I've got so far... don't laugh :-)

```
import java.io.*;

public class Diagonal
{
   public static void main(String[] args)throws IOException
   {
      InputStreamReader isr = new  InputStreamReader(System.in);
      BufferedReader in = new BufferedReader(isr);

      int dim;

      do
      {
      System.out.print("Dimension: ");
      dim = Integer.parseInt(in.readLine());
      }while(dim<=0);

      int[][] matrix = new int[dim][dim];

      for(int i=0;i<matrix.length;i++)
      {
         for(int j=0;j<matrix[i].length;j++)
         {
               matrix[i][j] = j+1;   
         }
      }

      //Transpose
      int transpose[][] = matrix;

      for(int i=0;i<dim;i++)
      {    
         for(int j=0;j<dim;j++)
         {
            transpose[j][i] = matrix[i][j];
         }
      }

      //print transpose
      for(int i=0;i<transpose.length;i++)
      {
         for(int j=0;j<transpose[i].length;j++)
         {
            System.out.print(transpose[i][j]);
         }
         System.out.println("");   
      }      
   }
}

```

I'm not sure but I think it is called a toeplitz matrix...

Grts.