Exforsys
+ Reply to Thread
Results 1 to 2 of 2

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 ...

  1. #1
    jessie143143 is offline Junior Member Array
    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.


  2. #2
    lokeshm is offline Member Array
    Join Date
    Apr 2005
    Answers
    83
    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.


Latest Article

Network Security Risk Assessment and Measurement

Read More...