Advertisement
porteno

Untitled

Nov 3rd, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. public class Main_q1 {
  2.  
  3. public static void main(String[] args) {
  4. int[][] m1_nums = { {1,2,2,3},
  5. {5,4,3,0},
  6. {3,0,1,7},
  7. {7,7,1,3}};
  8. Matrix m1 = new Matrix(m1_nums, 3, 1);
  9.  
  10. int[][] m2_nums = {{1,2,2,3},
  11. {5,4,3,0},
  12. {3,0,1,7},
  13. {7,7,1,3}};
  14. Matrix m2 = new Matrix( m2_nums,2, 2);
  15.  
  16. System.out.println("are they the same? "+m1.isSame(m2));
  17. System.out.println("in how many lines the n1 and n2 appears?"+m1.appearsInside());
  18. System.out.println("in how many lines the n1 and n2 appears?"+m2.appearsInside());
  19. int k = 3;
  20. System.out.println("given the value "+k+" is an inner 2d-arry that is left cornerare n1 and n2?"+m1.look_4_KxK(k) );
  21. }
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement