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 |
Explain what are final variable in java?
How do you convert an int to a double in java?
What are thread local variables?
How do you replace all in word?
What is return null in java?
What is the function of http?
Why do we create threads in java?
What are aggregate functions explain with examples?
Define array. Tell me about 2-D array.
Which number is denoted by leading zero in java?
Explain about doubly linked list
0 Answers Aditi Placement Service,
What is the purpose of static methods and variables?