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 state does a thread enter when it terminates its processing in java programming?
What is the difference between static synchronize() metod and synchronize() method?
What is a line separator in java?
Can we sort set in java?
What are the benefits of operations in java?
What is the difference between method overriding and overloading?
when to use ArrayList and when to use HashMap in webApplication.
What is the difference between keyword and identifier?
What is the purpose of main function in java?
What are the different types of methodologies?
What is use of arraylist in java?
What is mnemonic code?