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 |
How to do validation of the fields in any project ?
What is java life cycle?
What is thread pool? How can we create thread pool in java?
What is UNICODE?
Is java se free?
What is java util hashmap?
Can interface be private in java?
Which are thin and thicK wrapper Class's in Java?
Can static methods be inherited?
Tell me the difference between an applet and a Japplet?
Can a class inherit the constructors of its superclass?
Why would you desing a J2EE application so user data is entered by way of a JSP page and managed by an underlying Java Beans class?