为了锻炼大家阅读代码的能力,本代码无注释。
import java.awt.*;
import javax.swing.*;
import java.util.Scanner;
import java.util.Random;
public class Main {
public static void main(String[] args) {
JFrame frame = new JFrame(); Scanner s = new Scanner(System.in); int x, y, r, R;
frame.setSize(640, 480); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
for(;