0

Difference between length and length() methods in java?

26th Apr 2022, 12:09 PM
Sajid Junejo
Sajid Junejo - avatar
1 Antwort
+ 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.
26th Apr 2022, 12:14 PM
Avinesh
Avinesh - avatar