Why does the substring method of the String object behave so strangely?
It takes the starting number and the one next to the ending number for extracting the string. For e.g.
To extract "bee" from this, I have to use:Code:String MyString=new String("honeybee");
Why doesn't the substring behave like the MID/SubString functions in all other programming languages??Code:String YourString = MyString.substring(5, 8);
.





Reply With Quote