How to find the size of an array
a)array.length()
b)array.length
c)array.size()
d)array.size
Answers were Sorted based on User's Feedback
Answer / jigar gandhi
Answer is b
array.length is for array
and
array.size() is for arraylist
| Is This Answer Correct ? | 37 Yes | 1 No |
Answer / 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 |
When does an object becomes eligible for garbage collection in java?
Break statement can be used as labels in java?
What are 3 data types?
who can we create the object of a class? in how many ways we can create it (max 5)
What are the high-level thread states in java programming?
Does sprintf allocate memory?
Which software is used for java programming?
What are drawbacks of singleton class?
What is codebase?
How is a variable stored in memory?
How to sort elements in a parallel array in java?
What is heterogeneous in java?