javadoc wrote:Throws:
IndexOutOfBoundsException - if the beginIndex is negative, or endIndex is larger than the length of this String object, or beginIndex is larger than endIndex.
If you're like me, you sometimes forget that the second parameter for substring is the ending index and not a length! This habit comes from my BASIC days.
All things are lawful, but not all things are profitable.
Of course CR means when there is something to subtract.
You could have:
Which would give you an output of "ubtraction" (everything after 4th character (including fourth)).
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.