Advertisement
cgorrillaha

Untitled

Feb 4th, 2022
1,312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.42 KB | None | 0 0
  1. public static boolean isSquare(int[][] a){
  2.         boolean isSquare=true;
  3.         int count=0;
  4.         while(count<a.length&&isSquare){
  5.             if(a[count].length!=a.length){
  6.                 isSquare=false;
  7.             }
  8.         }
  9.         return isSquare;
  10. //        for(int[]row: a){
  11. //            if(a.length!=row.length){
  12. //                return false;
  13. //            }
  14. //        }
  15. //        return true;
  16.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement