#Java
What is the solution?

Answer:
I have answered the first part in another question of yours, but the second part is in the provided screenshot!
Explanation:
Steps to solve this problem:
Go through all the numbers from 1 -> n1, every time you go through each of these numbers, go through all the numbers from 1 -> n2. Multiply these numbers and add them to an output string. Print each line of output.