Write a program that draws an 10-by-10 grid. Use drawRect method. (File must be save as: Assignment10vii.java)

import java.awt.Graphics;
import java.applet.Applet;

public class Assignment10vii extends Applet
{
            public void paint(Graphics g)
            {
                        int i,j;

                        for (i=1; i<=10; i++)
                        for (j=1; j<=10; j++)
                        g.drawRect(j*30, i*20, 30, 20);
                        //g.drawRoundRect(j*40, i*20, 40, 20,5,5);
            }
}


////////////////////////////////////////////
Copy & paste this code in your Textpad & run, then you will get output.......
If you have any problem please comment below.........