Symbol#size() : size() is a Symbol class method which returns the size/length of the symbol object.
Parameter: Symbol values
Return: the size/length of the symbol object.
Example #1 :
Symbol a : aBcDeF Symbol b : äöü Symbol c : ABCDEF Symbol a size form : 6 Symbol b size form : 3 Symbol c size form : 6
Example #2 :
Symbol a : geeks Symbol b : åöó Symbol c : GEEKS Symbol a size form : 5 Symbol b size form : 3 Symbol c size 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.