Tuesday 22 July 2014

Difference between length and length()...????

ans:-

length:-

  • -It is final variable applicable for arrays .
  • -It is used to calculate length of array.


length():-

  • -It is final method of String class.
  • -It is applicable for String.
  • -It is used to calculate number of char present in String.
  • -It's return type is integer.

No comments:

Post a Comment