Index:A position within an ordered collection of elements. In substring(), indexes are used to specify where the extraction should start and end within the original string.
Length:The number of characters in a string or the size of an array. Understanding the length helps determine valid index values when using substring().
Immutable:In programming, immutable refers to objects whose state cannot be changed after they are created. Strings are immutable, meaning that when using substring(), a new string is created rather than modifying the original one.