Is an array an object in Java?

前端 未结 12 1765
我寻月下人不归
我寻月下人不归 2020-11-22 14:26

In Java we can declare an array using the following:

String[] array = new String[10]; 
int size = array.length; 

Does this mean that the arra

12条回答
  •  太阳男子
    2020-11-22 14:51

    I would say the answer is yes, although I might add that, strictly speaking, an array is an object in C++ too. From §1.8 [intro.object] of the current standard (FDIS):

    An object is a region of storage.

提交回复
热议问题