I am new to JAVA programming and currently doing some practice code via a website, I would like some clarity on below
given:
String str = "Jason";
str.substring(4,5);
result = "n"
Question:
Method substring
parameters are (begin_index, end_index)
.
but there is no index of 5 for variable str
.
does JAVA automatically -1 when it comes to the length method of a string?