what is difference between length and length 28 29 method in java

Solutions on MaxInterview for what is difference between length and length 28 29 method in java by the best coders in the world

showing results for - "what is difference between length and length 28 29 method in java"
Badis
04 Mar 2016
1length() : In String class we have length() method which is used 
2to return the number of characters in string.
3Ex : String str = “Hello World”;
4System.out.println(str.length());
5Str.length() will return 11 characters including space. 
6  
7length : we have length instance variable in arrays which will 
8return the number of values or objects in array.
9For example :
10String days[]={” Sun”,”Mon”,”wed”,”thu”,”fri”,”sat”};
11Will return 6 since the number of values in days array is 6