Driver function to test the above function
public static void main ( String args [ ] ) { int mat [ ] [ ] = { { 1 , 0 , 0 , 1 } , { 0 , 0 , 1 , 0 } , { 0 , 0 , 0 , 0 } } ; System . out . println ( " Input ▁ Matrix ▁ : " ) ; printMatrix ( mat ) ; modifyMatrix ( mat ) ; System . out . println ( " Matrix ▁ After ▁ Modification ▁ : " ) ; printMatrix ( mat ) ; } }