The number of characters contained in a String is stored as Integer in String’s . . . . . . . .

Substring property
Length property
Reverse property
Index property

The correct answer is B. Length property.

A string is a sequence of characters. The length of a string is the number of characters in the string. The length property of a string returns the number of characters in the string.

The substring property of a string returns a part of the string. The reverse property of a string returns the string in reverse order. The index property of a string returns the position of a character in the string.

For example, the string “Hello” has a length of 5. The substring property of “Hello” can be used to return the substring “llo”, which is the first 3 characters of the string. The reverse property of “Hello” can be used to return the string “olleH”, which is the string in reverse order. The index property of “Hello” can be used to return the position of the character “l”, which is 0.

Exit mobile version