
How to use nested loops in java when I want to print the 10 multiples of numbers 2 to 15(in multiplication table)

public class MultiplicationTable{
public static void main(String[] args) {
int[][] array = new int[16][16];
for (int i=1; i<array.length; i++) {
for (int j=1; j<array[i].length; j++) {
array[i][j] = i*j;
System.out.print(" " + array[i][j]);
}
System.out.println("");
}
}
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.