 Hello friends, I am Sanjay Gupta. In this video I am going to demonstrate you how you can print table of a number in Java. So for implementation of this program, first I am going to import a package that is util. Inside this package a class is available that is scanner. This scanner class is required to read values from user. Then I am going to implement another class whose name is table. Inside this table class, I am going to define main method. Now inside this main method, I am going to implement the logic which will print table of a number in Java. So first of all, I am going to read a number whose table we want to print. So I have declared a variable and now I am going to create an instance of scanner class and I have passed system.in as constructor value. System.in defines that the input will be received from control. Now with the help of system.out.print talent, the message enter a number will be displayed on output screen. The entered number will be stored inside n and for that I am calling next int method. This next int method is defined in scanner class. Now n is having the number whose table we want to print. Now I am going to iterate a loop. This loop will repeat 10 times because each table contains 10 digits only. Now with the help of system.out.print talent, I am going to print the calculated result. So here I am applying n into i. n is containing the original number and i is i's initial value is 1 and every time it is incremented by 1. So the original number will be multiplied with i and the calculated result will be displayed on output screen. So this way the logic is implemented in front of you. I have saved this program with table.c and my program is saved in d drive inside d drive. A folder is available that is java and in java folder table.java file is stored. Now I am going to open command prompt in command prompt. I have to set the current location. So this way now I am in d drive inside java folder for compilation I am typing the command java c table.java. You can see the program is compiled successfully. Now I have to execute this. It is asking for a number. I have entered 10. You can see the output. It is showing table on output screen. The table of 10 is displayed here. If you want to calculate table of another number, you can just execute the program again. This time I am going to enter 5. So you can see it is showing the table of 5. This way I hope you have understood how you can print table of a number in java with the help of for loop. I hope you have understood whatever I have explained to you. If you want to watch more programming related videos, you can follow my youtube channel. Thank you for watching this video.