Image

Imagebanana wrote in Imagejava_dev puzzled

Strings again

In my last post I complained about String.substring().
Can anyone explain why the parameters to this method are so... um... unintuitive?

It's the "endIndex - 1" part that I'm moaning about. What's that -1 doing in there?