📄 randominteger.java
字号:
import javax.swing.JOptionPane;public class RandomInteger { public static void main(String[] args) { int rd,counter; String output; output = "the result is \n"; for (counter = 1; counter<= 20; counter++) { rd = 1+(int)(Math.random()*6); output = output+ rd +" "; if((counter %5)==0) output= output+"\n"; } JOptionPane.showMessageDialog(null,output,"random",JOptionPane.INFORMATION_MESSAGE); System.exit(0); } }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -