This commit is contained in:
Tim Tersch
2020-08-27 11:00:49 +02:00
parent 467b773802
commit 4a0ada84ac

View File

@@ -296,7 +296,11 @@ public class Arrays {
* <code>["String 2","String 1"]</code>. * <code>["String 2","String 1"]</code>.
*/ */
public String[] reverse( String[] pArray ) { public String[] reverse( String[] pArray ) {
return null; String[] rev = new String[pArray.length];
for (int i = 0; i < rev.length; i++) {
rev[rev.length - 1 - i] = pArray[i];
}
return rev;
} }
/** /**