ch8ex91.java
来自「JAVA程序设计 丁岳伟 彭敦陆编 高等教育出版社 第7---11章程序」· Java 代码 · 共 16 行
JAVA
16 行
import java.io.*;
public class ch8ex91{
public static void main(String[]args){
int x;
try{
DataOutputStream fout=new DataOutputStream(new FileOutputStream("grades.dat"));
for(int j=0;j<150;j++){
x=(int)(Math.random()*1000000)%100;
fout.writeInt(x);
}
fout.close();
}catch(Exception e){
e.printStackTrace();
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?