这困扰我,我的代码工作和运行但是当我去运行它时,它似乎循环我的for循环两次,任何人都可以帮助我的逻辑?谢谢...
package pkgcirc;
import java.util.Random;
import javax.swing.JFrame;
import javax.swing.JPanel;
import java.awt.*;
/*
* Notes:
* Draw 20 circles
* radius/location (x/y/r) all random
* if (circle) is between radii pt (step thru loop) of all values, if its within ,
* draw it cyan if it overlaps, else black
*
*/
public class Main extends JPanel {
int[] radius = new int [3];
int[] xArray = new int [3];
int[] yArray = new int [3];
public Main()
{
Random g …Run Code Online (Sandbox Code Playgroud)