Closed. This question needs details or clarity。它当前不接受答案。
                            
                        
                    
                
            
                    
                
                        
                            
                        
                    
                        
                            想改善这个问题吗?添加详细信息并通过editing this post阐明问题。
                        
                        6年前关闭。
                    
                
        

为什么不允许我启动程序,它说:删除短语标记。对不起,新手Q(此论坛中的第一个Q)

public class Pirma {

public static void main(String[] args) {

    String[] wordlistOne = {"ziaurus", "grazus", "baisus", "fainas"};
    String[] wordlistTwo = {"afigienas", "negeras", "idomus", "juokingas"};
    String[] wordlistThree = {"nekoks", "neidomus", "lameris", "kietas"};

    int oneLength = wordlistOne.length;
    int twoLength = wordlistTwo.length;
    int threeLength = wordlistThree.length;

    int rand1 = (int) (Math.random() * oneLength);
    int rand2 = (int) (Math.random() * twoLength);
    int rand3 = (int) (Math.random() * threeLength);

    ***String phrase*** = wordlistOne[rand1] + " " + wordlistTwo[rand2] + " " + wordlistThree[rand3];
    System.out.println("What we need is" + " " ***phrase***);
}
}

最佳答案

您忘记了+" "之间的phrase

09-25 18:51