You can change value 9 before starting animation

Output

Variable Name      Value in Memory
i
i
gcd
k
  1  public class MultiplicationTable {
  2    /** Main method */
  3    public static void main(String[] args) {
  4      // Display the table heading
  5      System.out.println("           Multiplication Table");
  6  
  7      // Display the number title
  8      System.out.print("    ");
  9      for (int j = 1; j <= 9; j++)
 10        System.out.print("   " + j);
 11  
 12      System.out.println("\n-----------------------------------------");
 13  
 14      // Print table body
 15      for (int i = 1; i <= ; i++) {
 16        System.out.print(i + " | ");
 17        for (int j = 1; j <= 9; j++) {
 18          // Display the product and align properly
 19          System.out.printf("%4d", i * j);
 20        }
 21        System.out.println();
 22      }
 23    }
 24  }