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 |
There are three interfaces A,B & C. A extends B, B extends C, and C extends A.Is it multiple Inheritance? please anybody help me.....
Can singleton class be serialized?
What is the difference between Stream Reader and Stream Writer?
How many types of JVM's (OR) Name of the JVM's which are used in Tomcat & Weblogic servers ?
Why isn’t there operator overloading?
Can a static class implement an interface?
Is java hard to learn?
How listener identify that the event came from a particular object?
I am unable to find or learn about print command. I have a graphical program in core java in applet but i want to give print command but i have coding for that so if anyone know about this plz mail me on avdhesh_chauhan007@yahoo.co.in
Why is boolean important?
Can we override final method?
my method "abc" return array of interface "xyz" and "pqr" is abstract class implements abc and class "jkl" extends pqr My problem 1) when i call abc it retrun array xyz how can i do this hint xyz refer_xyz = new jkl(); but i can't create array. 2)I want to access method of jkl using reference of xyz??