Check out example codes for "NumSelfDivisors java". It will help you in understanding the concepts better.

Code Example 1

b.
public static int[] firstNumSelfDivisors(int start, int num)
  {
    int[] a = new int[num]; 1
    int count = 0;
    int n = start;
    while (count < num)
    {
      if (isSelfDivisor(n))
      {
        a[count] = n;
        count++;
      }
      n++;
    }
    return a;
  }

Learn ReactJs, React Native from akashmittal.com