import java.util.Random; class Demo111 { public static void main(String[] args) { String[] str={ "A","B","C","D","E","F","G","H" }; Random r=new Random(); int index=r.nextInt(str.length); System.out.println("点到了"+str[index]); } }