10 Java 2D Array Exercises: From Matrix Operations to Advanced Traversals
- 1. Program to initialize and print a 2D array
- 2. Program to find the sum of all elements in a 2D array
- 3. Program to transpose a square matrix
- 4. Program to multiply two matrices
- 5. Program to find the sum of diagonal elements
- 6. Program to search for an element in a 2D array
- 7. Program to sort each row of a 2D array
- 8. Program to print boundary elements of a 2D array
- 9. Program to print a 2D array in spiral order
- 10. Program to rotate a square matrix by 90 degrees