Here you can find the source of toCharArray(double[][] array)
public static char[][] toCharArray(double[][] array)
//package com.java2s; //License from project: Open Source License public class Main { public static char[][] toCharArray(double[][] array) { int nr = array.length; int nc = array[0].length; char[][] ret = new char[nr][nc]; for (int i = 0; i < nr; i++) { for (int j = 0; j < nc; j++) { ret[i][j] = (char) array[i][j]; }/*w w w .j a v a 2s .co m*/ } return ret; } public static char[][] toCharArray(float[][] array) { int nr = array.length; int nc = array[0].length; char[][] ret = new char[nr][nc]; for (int i = 0; i < nr; i++) { for (int j = 0; j < nc; j++) { ret[i][j] = (char) array[i][j]; } } return ret; } public static char[][] toCharArray(int[][] array) { int nr = array.length; int nc = array[0].length; char[][] ret = new char[nr][nc]; for (int i = 0; i < nr; i++) { for (int j = 0; j < nc; j++) { ret[i][j] = (char) array[i][j]; } } return ret; } public static char[][] toCharArray(long[][] array) { int nr = array.length; int nc = array[0].length; char[][] ret = new char[nr][nc]; for (int i = 0; i < nr; i++) { for (int j = 0; j < nc; j++) { ret[i][j] = (char) array[i][j]; } } return ret; } public static char[][] toCharArray(short[][] array) { int nr = array.length; int nc = array[0].length; char[][] ret = new char[nr][nc]; for (int i = 0; i < nr; i++) { for (int j = 0; j < nc; j++) { ret[i][j] = (char) array[i][j]; } } return ret; } public static char[][] toCharArray(String[][] array) { int nr = array.length; int nc = array[0].length; char[][] ret = new char[nr][nc]; for (int i = 0; i < nr; i++) { for (int j = 0; j < nc; j++) { ret[i][j] = (char) Byte.parseByte(array[i][j]); } } return ret; } }