Check out example codes for "how to multiply a number by itself using for loop in java". It will help you in understanding the concepts better.

Code Example 1

int originalNumber = 1;
for (int multiple = originalNumber; multiple <= 10000; multiple += originalNumber) {
    // Use multiple however you want to
}

Learn ReactJs, React Native from akashmittal.com