If aaaa is an array then why aaaa.length why not aaaa.length()?

If aaaa is an array then why aaaa.length why not aaaa.length()?

In Java API, we have an Array class which has a variable named \"length\" to count the length of the array, hence we say, aaaa.length to count the length of the array.

In the String class, we have a method named length(), which returns the length of the string. 

By:Jalees
Date:2016-01-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related Java Subjective Links

Java Subjective interview questions and answers for experienced and fresher