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