方法一:for循环(最常用)
方法二:利用 foreach
方法三:利用jdk自带方法:java.util.Arrays.toString

//String类型的i数组
public class StringTest01 {
    public static void main(String[] args) {
        String[] i = {"1","5","sad","gfh","asd"};
        //遍历数组:
        //way1:
        for (int j = 0; j <i.length ; j++) {
            System.out.print(i[j] + "\t");
        }
        //way2:
        for (String k: i){
            System.out.print(k + "\t");
        }
        //way3:
        System.out.println(Arrays.toString(i));
    }
}