Digit sum loops+random positive number generator
I have some suggestion for you.

Code duplication

In your code, you have some code duplication that can be extracted in a method. By extracting the code, the code will become shorter, be less error-prone and easier to read.


I suggest that you make a method to print a question and read the user input. 


public static void main(String[] args) {
   //[...]
   int a1 = askQuestionAndReceiveAnswer(scn, "1TH NUMBER : ");
   int a2 = askQuestionAndReceiveAnswer(scn, "2ND NUMBER : ");
   //[...]
}


private static int askQuestionAndReceiveAnswer(Scanner scn, String s) {
   System.out.println(s);
   return scn.nextInt();
}



Since the logic is the same to handle the sum, you can extract both of the while into a method. This extraction will remove lots of code!



public static void main(String[] args) {
   //[...]
   int sum1 = getSum(a1);
   int sum2 = getSum(a2);

   int temp = sum1 + sum2; //temporary-for storage /=

   int sum3 = getSum(temp);
   //[...]
}

private static int getSum(int userInput) {
   int currentSum = 0;
   while (userInput &gt; 0) {
      currentSum += userInput % 10;
      userInput /= 10;
   }
   return currentSum;
}


Other observations


In my opinion, I would extract the last calculation in a method and return the result.


public static void main(String[] args) {
   //[...]
   int number = findNumber(rnd, sum3);
   System.out.println(number + " this is my number");
   //[...]
}

private static int findNumber(Random rnd, int sum3) {
   int sum4 = 0;
   while (true) {
      int a3 = rnd.nextInt(Integer.MAX_VALUE);
      sum4 += (a3) % 10;
      (a3) /= 10;
      if (sum4 &gt; sum3) {
         return a3;
      }
   }
}


Refactored code

public static void main(String[] args) {
   Random rnd = new Random();
   Scanner scn = new Scanner(System.in);

   int a1 = askQuestionAndReceiveAnswer(scn, "1TH NUMBER : ");
   int a2 = askQuestionAndReceiveAnswer(scn, "2ND NUMBER : ");
   System.out.println((0 &gt; a1 || 0 &gt; a2 ? "ERROR-NEGATIVE NUMBER" : "OK"));

   int sum1 = getSum(a1);
   int sum2 = getSum(a2);
   int temp = sum1 + sum2; //temporary-for storage /=

   int sum3 = getSum(temp);

   int number = findNumber(rnd, sum3);
   System.out.println(number + " this is my number");
}

private static int findNumber(Random rnd, int sum3) {
   int sum4 = 0;
   while (true) {
      int a3 = rnd.nextInt(Integer.MAX_VALUE);
      sum4 += (a3) % 10;
      (a3) /= 10;
      if (sum4 &gt; sum3) {
         return a3;
      }
   }
}

private static int getSum(int userInput) {
   int currentSum = 0;
   while (userInput &gt; 0) {
      currentSum += userInput % 10;
      userInput /= 10;
   }
   return currentSum;
}

private static int askQuestionAndReceiveAnswer(Scanner scn, String s) {
   System.out.println(s);
   return scn.nextInt();
}