This example is for Java beginners to let them learn two basic concepts of the language
1. for loop
2. Using Scanner class to get input from keyboard
import java.util.Scanner;
public class TableOfInteger {
// start of main() function
public static void main(String[] args) {
Scanner keyboard = new Scanner(System.in);
// get an object of Scanner class for getting input from keyboard
System.out.println("enter an integer for generate table ");
int table = keyboard.nextInt();
// for loop
for(int i=1;i<=10;i++)
System.out.println(table + "X" + i +"=" +table*i);
}
//end of main function()
}
Watch video here
https://youtu.be/sX0XAROhuiQ