Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static boolean isSquare(int[][] a){
- boolean isSquare=true;
- int count=0;
- while(count<a.length&&isSquare){
- if(a[count].length!=a.length){
- isSquare=false;
- }
- }
- return isSquare;
- // for(int[]row: a){
- // if(a.length!=row.length){
- // return false;
- // }
- // }
- // return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement