Computer Science, asked by vanijain3865, 8 months ago

If 'str' is the object of String class and its content is "Thank God , then what is the value of str.length()?

Answers

Answered by evanwalters
0

Answer:

9

Explanation:

Answered by AskewTronics
0

"9" is the output of str.length() :

Explanation:

  • The length function is used in the java to calculate the length of the string. So if str holds the message as "Thank God", and when the user put the statement "int s=str.length()", then s will hold the value 9.
  • So when a user wants to know the length of any string then he can calculate with the help of length function.

Learn More :

  • Java: https://brainly.in/question/13792074
Similar questions