Guest User

Untitled

a guest
Feb 17th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. public int [][] appendMatrix(int[][]matrix, int [][] matrix2)
  2. {
  3.  
  4. this.matrix = new int[matrix.length + matrix2.length][matrix[0].length];
  5. for(int i = 0; i < matrix.length; i++)
  6. {
  7. for(int j = 0; j < matrix[i].length; j++)
  8. {
  9. this.matrix[i][j] = matrix[i][j];
  10. }
  11. for(int j = matrix.length; j < matrix.length + matrix2.length; j++)
  12. {
  13. this.matrix[i][j]= matrix2[i-matrix.length][j];
  14. }
  15. }
  16. return this.matrix;**
Add Comment
Please, Sign In to add comment