package com.test.bs;
import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Random;
import java.util.Scanner;
public class Test_Arrays {
public static void main(String[] args) {
// TODO Auto-generated method stub
// int a[]=new int[5];
// int[] b=new int[5];
// 遍历一维数组
// int c[]= {3,-2,5,-6};
// for(int i:c){
// System.out.print(i+" ");
// }
// for (int i = 0; i < c.length; i++) {
// System.out.print(c[i]+",");
// }
// 遍历二维数组
// int[][] a= {
{11,12,13,14},
// {21,22,23,24},
// {31,32,33,34}};
// for (int i = 0; i < a.length; i++) {
// for (int j = 0; j < a[i].length; j++) {
// System.out.print(a[i][j]+",");
// }
// System.out.println(" ");
// }
// for(int[]k:a) {
// for(int t:k) {
// System.out.print(t+",");
// }
// System.out.println(" ");
// }
// 编写一个长度为5
【java】数组练习
最新推荐文章于 2022-09-16 09:46:50 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)