How to measure the length of a String var? | Sololearn: Learn to code for FREE!

+3

How to measure the length of a String var?

I have a string variable and I want to get its length, how?

9/2/2017 2:09:55 PM

Robert Sokolov

1 Answer

New Answer

+4

using length() method within the String class String name = "Robby"; int length = name.length(); some more explanation: https://www.tutorialspoint.com/java/java_string_length.htm