阅读下面的代码,输出结果是() public static void main(String[] args) { Random random1 = new Random(10); Random random2 = new Random(10); for(int i=0;i<5;i++){ System.out.print(random1.nextInt(5)); } for(int i=0;i<5;i++){ System.out.print(random2.nextInt(5)); } }
A: 3.030130301E9
B: 5.04813268E9
C: 3.268023579E9
D: 1111111111
A: 3.030130301E9
B: 5.04813268E9
C: 3.268023579E9
D: 1111111111
举一反三
- 阅读下面的代码,输出结果是( ) public static void main(String[] args) { Random random1 = new Random(10); Random random2 = new Random(10); for(int i=0;i<5;i++){ System.out.print(random1.nextInt(5)); } for(int i=0;i<5;i++){ System.out.print(random2.nextInt(5)); } }
- 阅读下面的代码 public static void main(String[] args) { Random random1 = new Random(10); Random random2 = new Random(10); for(int i=0;i<5;i++){ System.out.print(random1.nextInt(5)); } System.out.println(); for(int i=0;i<5;i++){ System.out.print(random2.nextInt(5)); } } 下列选项中,程序的输出结果是
- 阅读下面的代码,输出结果是( )[br][/br] public static void main(String[] args) {[br][/br] Random random1 = new Random(10); [br][/br] Random random2 = new Random(10); [br][/br] for(int i=0;i[5;i++){<br] System.out.print(random1.nextInt(5));[br][/br] }[br][/br] System.out.println();[br][/br] for(int i=0;i[5;i++){<br] System.out.print(random2.nextInt(5));[br][/br] }[br][/br] } A: 3030130301 B: 5048132680 C: 3268023579 D: 1111111111
- 阅读下面的代码[br][/br]public static void main(String[] args) {[br][/br] Random random1 = new Random(10);[br][/br] Random random2 = new Random(10);[br][/br] for(int i=0;i[5;i++){<br] System.out.print(random1.nextInt(5));[br][/br] }[br][/br] System.out.println();[br][/br] for(int i=0;i[5;i++){<br] System.out.print(random2.nextInt(5));[br][/br] }[br][/br]} 下列选项中,程序的输出结果是()[br][/br] A. B. C. D. A: 3030130301 B: 5048132680 C: 3268023579 D: 1111111111
- 以下代码的输出结果是_________。 public static void main(String[] args){ for(int i=1;i<=10;i++){ if(i%2==0 || i%5==0){ continue; } System.out.print(i+"\t"); } }