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 |
What is the purpose of static methods and variables?
Explain the difference between call by refrence and call by value?
what do you meant by Runtime Polymorphism?
13 Answers BVIMR, IBM, Persistent,
How do I get 64 bit java?
What is java virtual machine and how it is considered in context of java’s platform independent feature?
What are the benefits of operations?
What is module in project?
Can we have a abstract class withought any method? What is a purspose of this?
Can a class be subclass of itself?
What is the size of integer?
How to change the priority of thread or how to set the priority of thread?
Explain method overloading?