Here you can find the source of flipOverX(T[][] arr)
Parameter | Description |
---|---|
arr | a parameter |
public static <T> void flipOverX(T[][] arr)
//package com.java2s; //License from project: Open Source License public class Main { /**//from ww w . j a v a 2s . co m * Flips 2D Array as if around a Horizontal Axis. Does NOT Preserve Original 2D Array. * @param arr */ public static <T> void flipOverX(T[][] arr) { int z = arr.length - 1; for (int a = 0; a < z; a++) { T[] tmp = arr[a]; arr[a] = arr[z]; arr[z] = tmp; } } }