Java Object Array Create toObjectArraySquareMatrix(T[][] matrixT)

Here you can find the source of toObjectArraySquareMatrix(T[][] matrixT)

Description

to Object Array Square Matrix

License

Open Source License

Declaration

public static <T> Object[][] toObjectArraySquareMatrix(T[][] matrixT) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static <T> Object[][] toObjectArraySquareMatrix(T[][] matrixT) {
        int size = matrixT.length;
        Object[][] arObj = new Object[size][size];
        for (int i = 0; i < size; i++) {
            for (int j = 0; j < size; j++) {
                arObj[i][j] = (Object) matrixT[i][j];
            }//from  w  w  w.ja  v a  2  s. c o m
        }
        return arObj;
    }
}

Related

  1. toObjectArray(int[] oldArray)
  2. toObjectArray(Object array)
  3. toObjectArray(String[][] originalarray)
  4. toObjectArray(T... t)
  5. toObjectArray(T[] v)