Is there a problem in my class getSubString Fuction.
there are two arguments taken (starting-index and length(that how big you want your substring to be))
"this is interesting." is calling object.
the main program takes the argument(start-index = 8, length = 11)
Your bit of code looks like a function, but is it a stand alone function or part of a class? The function definition would be useful to see how he function parameters are used. Some indication of how the function is called would be helpful.
I really do not want to guess at the missing parts and get it wrong.
First there is a Class object made like s1 = "This is interesting ." then the function is called like s1.getSubString(8,11). The function above is a function of a class.