We know that Arrays are objects so why cannot we write strArray.length()?



We know that Arrays are objects so why cannot we write strArray.length()?..

Answer / Suraj Singh

Arrays in Java are not objects of the Object class, but rather primitive types or wrapper classes for primitive types. Therefore, they do not inherit methods like length(), which is a method specific to the String object.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Structures Interview Questions

What data structure underlies a python list?

1 Answers  


What is difference between data type and data structure?

1 Answers  


What is the default capacity of hashmap?

1 Answers  


What is a pseudocode example?

1 Answers  


Define a Deque?

1 Answers  


Explain binary searching and Fibinocci search?

1 Answers  


What is impact of signed numbers on the memory?

1 Answers  


How do you define a set?

1 Answers  


Describe tree database. Explain its common uses.

1 Answers  


What is data structure? Explain.

1 Answers  


Program to remove duplicate elements in an array.

1 Answers   InterGraph,


What does isempty() member method determines?

1 Answers  


Categories