小编Mar*_*nas的帖子

JAVA(新手Q)局部变量

为什么我不允许启动程序,它说:删除短语令牌.抱歉noob 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]; …
Run Code Online (Sandbox Code Playgroud)

java variables local

0
推荐指数
1
解决办法
87
查看次数

标签 统计

java ×1

local ×1

variables ×1