Driver Program to test above function
public static void main ( String arg [ ] ) { int a [ ] [ ] = { { 1 , 2 , 3 } , { 4 , 5 , 6 } , { 7 , 8 , 9 } } ; System . out . println ( getGreatestSum ( a ) ) ; int b [ ] [ ] = { { 4 , 5 , 6 } , { 4 , 5 , 6 } , { 4 , 5 , 6 } } ; System . out . println ( getGreatestSum ( b ) ) ; } }