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 bytecode in java ?
What is file in java?
Distinguish method overloading and method overriding
What do you understand by garbage collection in Java? Can it be forced to run?
What do you mean by flow of struts?
When do I need to use reflection feature in java?
What is variable and rules of variable?
What are the default and parameterized constructors?
Why are variables important in research?
why operator overloading is removed in java?
What is the difference between panel and frame ?
7 Answers HCL, IBM, Raim Techno Solutions,
is memory to the abstract class allocated ..or objects not instantiated