Computer Science, asked by rohanchaudhary2139, 1 year ago

If 'str' is the object of String class and its content is "Thank GOD", then what is the value of str.length() ?(a) 9
(b) 10
(c) 8
(d) 11

Answers

Answered by aqibkincsem
11

The answer here is 9 since the blank space is also a part of string class object defined as str.

String is a sequence of characters For e,g Hello is a string of '5' characters.

In java, string is an immutable object which means it is constant and cannot be changed once it has been created.

Answered by Anonymous
10
Holla ^_^

☸ Required Answer is ⬇⬇ ⬇

⭕ a). 9

Vielen Dank ♥
Similar questions