diff between length and length() | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 1

diff between length and length()

26th Jul 2016, 5:46 AM
Nishant Jaiswal
Nishant Jaiswal - avatar
3 Réponses
+ 5
length is a variable whereas length() is a method. Generally, length is used to for arrays whereas length() would be for Strings
26th Jul 2016, 6:26 AM
James
James - avatar
0
Agree.
5th Aug 2016, 3:51 AM
Waylon Luo
0
Length is a identifier or a variable, length() is a method to find the length
18th Nov 2016, 4:42 AM
Pavankumar V
Pavankumar V - avatar