Practice Set 2
Accenture Success Primer ExammediumMay 2026 DumpsProgramming

How can we find the length of a string in Java?

Answer options

A
length()
B
size()
C
len
D
length

Correct answer: length()

Explanation

Quick AnswerThe correct answer is length() because it directly addresses the core logic of Practice Set 2.

In Java, String length is retrieved via the length() method.

Related Accenture Practice Set 2 questions

Practice more Accenture Practice Set 2 questions

PrimerPrep has 1400+ practice questions, 2026 simulations and coding hands-on — all free.

Watch Walkthroughs!