猜单词

  String[] danci = {"dnskend","sdalfdjc","dakddsk","apple","iphone","icloud","itunes","store","scorn","overlord"};
        Random random = new Random();

        int index =random.nextInt(danci.length);
        String suijidanci = danci[index];
        char [] hengxian = new char[suijidanci.length()];
        for (int i =0;i0)
        {
            System.out.println("你赢了");
        }
        else {
            System.out.println("你输了");
        }

你可能感兴趣的:(猜单词)