Symbol#length() : length() is a Symbol class method which returns the length of the symbol.
Parameter: Symbol values
Return: the length of the symbol
Example #1 :
Symbol a : aBcDeF Symbol b : äöü Symbol c : ABCDEF Symbol a length form : 6 Symbol b length form : 3 Symbol c length form : 6
Example #2 :
Symbol a : geeks Symbol b : åöó Symbol c : GEEKS Symbol a length form : 5 Symbol b length form : 3 Symbol c length form : 5
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.