提示:您可在线编辑运行本教程的实例 - 运行实例,去试试!
反向阵列
/* 来自 nowjava - 时代Java*/ //package com.nowjava; public class Main { public static void main(String[] argv) throws Exception { String[] array = new String[] { "1", "abc", "level", null, "nowjava.com", "asdf 123" }; System.out.println(java.util.Arrays.toString(reverseArray(array))); } public static String[] reverseArray(String[] array) { String[] arrayReversed = new String[array.length]; for (