The function func(int m,int n) outputs (for m = 3, n = 5):334345343I came up with this code:void func(int m,int n){  for(int i=1;i<n-m+2;i++){   int k=i;  int j=m;    while(k>0)  {    System.out.print(j);     k--;j++;   } System.out.println();}for(int i=n-m;i>0;i--){  int k=i;  int j=m;  while(k>0)  {  System.out.print(j);     k--;j++;   }System.out.println();    }}Is there an alternate, better way to do it? Can it be more efficient?
Number pyramid in Java
java;performance;formatting