KnowledgeBoat Logo

Computer Applications

Differentiate between length and length()

Java Arrays

ICSE 2010

103 Likes

Answer

lengthlength()
length is an attribute i.e. a data member of array.length() is a member method of String class.
It gives the length of an array i.e. the number of elements stored in an array.It gives the number of characters present in a string.

Answered By

65 Likes


Related Questions