Java MCQ: How to get length of a String? 📏
Continuing my Java fundamentals practice, here’s another quick one:
Which of this method of class String is used to obtain the length of a String object?
a) get() b) Sizeof() c) lengthof() d) length()
Drop your answer 👇 and bonus points if you explain why the others are incorrect!
I’ve been collecting these concept-based MCQs while revising—happy to share more if anyone’s interested.
Also putting them together here: choicechapter.com (open to feedback!)












