请问这样编写对吗???
public class difNum { int x,y,z;
 int flag;
 
 public difNum()
 {
  for(x=10000;x<32000;x++)
  {
   int[]a={0,0,0,0,0,0,0,0,0,0,0};
      flag=0;
   x=x*x;
   y=x;
   while(x>0)
   {
    z=x%10;
    if(a[z]==0)
      {
     a[z]=1;
           x= (x/10);
           flag++;
      }
    else
     break;
   }
  }
   if(x>=32000)
   System.out.print("没有这样的数!");
   else if(flag==9)
   {
     System.out.print(y);
   }
 }
 public static void main(String[] args) {
  // TODO Auto-generated method stub
  new difNum(); }}