import java.applet.*; import java.awt.*; public class Test1 extends Applet { private int onecnt=0; private int twocnt=0; private int threecnt=0; private int fourcnt=0; private int fivecnt=0; private int sixcnt=0; public void paint(Graphics g) { int a[] = new int[100]; int count[] =new int[7]; for(int i=0;i< 100;i++) { a[i]= (int)(Math.random()*6+1); count[a[i]]++; System.out.print(a[i] + " "); switch(a[i]) { case 1:onecnt++;break; case 2:twocnt++;break; case 3:threecnt++;break; case 4:fourcnt++;b reak; case 5:fivecnt++;break; case 6:sixcnt++;break; } 。。。。