adhdhackers

Matrix

May 4th, 2017
375
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.43 KB | None | 0 0
  1. public class Matrix {
  2.  
  3.     private int mat[][];
  4.    
  5.     public Matrix(int[][] m) {
  6.         mat = m;
  7.     }
  8.    
  9.     public void reverseAllRows() {
  10.         for(int i = 0; i < mat.length; i++)
  11.         {
  12.             ArrayUtil.reverseArray(mat[i]);
  13.         }
  14.        
  15.     }
  16.    
  17.     public static void reverseMatrix() {
  18.        
  19.     }
  20.    
  21.     public void printMat() {
  22.        
  23.         for(int i = 0; i < mat.length; i++)
  24.         {
  25.             ArrayUtil.printArray(mat[i]);
  26.             System.out.println("");
  27.         }
  28.        
  29.     }
  30.    
  31.    
  32. }
Advertisement
Add Comment
Please, Sign In to add comment