Write a pragram that draws eight concentric circles. The circles should be separated by 10 pixels. Use the drawOval method of class Graphics. ( File must be save as: Assignment10i.java)
import java.applet.Applet;
import java.awt.Graphics;
import java.awt.Color;
public class Assignment10i extends Applet
{
public void paint(Graphics g)
{
int i;
for (i=1; i<=8; i++)
g.drawOval(100-i*10,100-i*10,i*20,i*20);
}
}
////////////////////////////////////////////
Copy & paste this code in your Textpad & run, then you will get output.......
If you have any problem please comment below.........
Copy & paste this code in your Textpad & run, then you will get output.......
If you have any problem please comment below.........