New course! Every coder should learn Generative AI!
Try a free lesson0
Difference between length and length() methods in java?
1 Answer
+ 4
length is an attribute which is used with arrays of any kind to get it's size. Whereas length() is a method specifically used with Strings and returns the number of characters.