I am converting python code to java. It appears that when a python string is empty, a statement like this
mystring[-4:]
is perfectly fine. no exception occurs at all.
Is this right? I am from a java background. I just find this hard to believe.
I am converting python code to java. It appears that when a python string is empty, a statement like this
mystring[-4:]
is perfectly fine. no exception occurs at all.
Is this right? I am from a java background. I just find this hard to believe.