filmov
tv
Java substring Method demo
Показать описание
String FullName = "Bill Gates";
/* 0 and 2. This means start grabbing characters at position 0 in the string
and stop grabbing when you have two of them...
Actually! The second number between the round brackets of substring
doesn't mean how many characters you want to grab.
It means the position in the string that you want to end at!
*/
/* if we have onle one number between the round brackets of substring - e.g. - (2), Java will
start at character two of the string, and then grab the characters from
position 2 right to the end of the string. */
/* 0 and 2. This means start grabbing characters at position 0 in the string
and stop grabbing when you have two of them...
Actually! The second number between the round brackets of substring
doesn't mean how many characters you want to grab.
It means the position in the string that you want to end at!
*/
/* if we have onle one number between the round brackets of substring - e.g. - (2), Java will
start at character two of the string, and then grab the characters from
position 2 right to the end of the string. */