Remember that matrix multiplication requires that the number of rows in matrix A equal the number of columns in matrix B. The rows are the first dimension of the array and the columns are the second...
Type: Posts; User: codethrupain
Remember that matrix multiplication requires that the number of rows in matrix A equal the number of columns in matrix B. The rows are the first dimension of the array and the columns are the second...
Try this and see if it makes sense.
public class UtilityMatrix {
public static int[][] addMatrix(int[][] a, int[][] b) {
int[][] bad = {{0}}; // a dummy to send back if the matrices are...
Ted,
You should test to ensure the matrices a and b are the same size. You may only add matrices that are the same size. There's a length method of arrays but I think you'll need to check length...
Every example I have found tells me the following should replace brackets with spaces
String lineIn = "[10/Feb/2011 15:56:27 -0000]";
lineIn.replace('[', ' ');
lineIn.replace(']', ' ');...