Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/file/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java ……没有_Java_File_Io - Fatal编程技术网

Java ……没有

Java ……没有,java,file,io,Java,File,Io,……我 如何 没有答案 只有一个答案,但该答案没有UPVOTES,只有零个答案 只有一个答案,但该答案没有UPVOTES,只有零个答案 只有一个答案,但这个答案没有投票权我不会告诉你如何回答整个问题。但你似乎主要对随机部分感到困惑。下面是你如何做到这一点 Random rand = new Random(); int i = 582; // some arbitrary integer to act as the input int randInt = rand(5) + 5; // rando

……我 如何 没有答案 只有一个答案,但该答案没有UPVOTES,只有零个答案 只有一个答案,但该答案没有UPVOTES,只有零个答案
只有一个答案,但这个答案没有投票权

我不会告诉你如何回答整个问题。但你似乎主要对随机部分感到困惑。下面是你如何做到这一点

Random rand = new Random();
int i = 582; // some arbitrary integer to act as the input
int randInt = rand(5) + 5; // random value from 5 - 9 inclusive
int j = i + randInt; // add the random value to the output integer
i是输入文件中的整数,j是输出整数