length: Length is a variable in java which is used to find the length of the array. Example:
int[] a = new int[6];
int l = a.length; // l = 6
length(): It is a final method of String class which is used to find the length of the string. Example:
String s = "Vinay";
int l = s.length(); //l=5;