How to find the size of an array
a)array.length()
b)array.length
c)array.size()
d)array.size

Answer Posted / nagesh

length is a public static final variable in an array which
will specify the capacity of that array. length() is a
function on strings to find number of characters in that.

Is This Answer Correct ?    11 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between conversation & casting?

574


Can you explain inner class.

590


How do you print array in java?

552


What is exception hierarchy in java?

585


How can we avoid including a header more than once?

608






When parseint method can be used?

535


Difference between ‘is-a’ and ‘has-a’ relationship in java?

538


What is double parsedouble in java?

542


How do you sort in descending order in java using collections sort?

494


What is the default size of arraylist in java?

500


Why do we create public static method in java?

577


Explain about automatic type conversion in java?

565


What is a boolean flag in java?

561


What is vector capacity in java?

593


What is the arraylist in java?

528