
- Forum
- Programming Talk
- Java
- Difference between length and length() in java
Difference between length and length() in java
This is a discussion on Difference between length and length() in java within the Java forums, part of the Programming Talk category; length is a keyword , used to find out the array length. length() - method , used to find out ...
-
10-24-2011, 06:44 AM #1
- Join Date
- Oct 2011
- Answers
- 10
Difference between length and length() in java
length is a keyword , used to find out the array length.
length() - method , used to find out the String length.
-
length() is a method that is defined in String class. length() method returns the length of the string and is used to find the number of characters present in a string.
Whereas, length property returns the number of elements in an array and is used to find the size of array.

Reply With Quote





