Which of these methods of the class String is used to obtain length of String object?
A. get()
B. Sizeof()
C. lengthof()
D. length()
Answer:A
Which of these methods of the class String is used to obtain length of String object?
A. get() B. Sizeof() C. lengthof() D. length()
Explanation: Method length() of string class is used to get the length of the object as string.Length and hence invokes the length() method.