public static void main(String[] args) { // 数组遍历 System.out.println("1 数组遍历"); String[] str1 = { "数", "组", "遍", "历" }; arrayTravelse(str1); System.out.println("===================");
}
// 数组遍历 private static void arrayTravelse(String[] str) { for (int i = 0; i < str.length; i++) { String j = str[i]; System.out.print(j + " "); } System.out.println(); }