create empty 2 - D matrix that counts all palindrome substring . dp [ i ] [ j ] stores counts of palindromic substrings in st [ i . . j ]
int [ ] [ ] dp = RectangularArrays . ReturnRectangularIntArray ( n , n ) ;