Java create table in html file

In the previous section, you have seen different operations on text file like
creating a file, deleting a file, copying a file etc. Here we are going to
perform operation on a html file.

You can see in the given example, we have created an instance of PrintWriter
class and used FileWriter as an argument. Now we have used the html table tag to
create a table in html file. In tables we have created a rows and columns to
display the numbers and their squares from numbers 1 to 20.