Are all data types a specific type of an Object?
If I call Array a type of Object, then what would I call the values inside the Array?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
That depends on the programming language. For example there exist no objects in C. Here, an array is a continuous space in memory.
In PHP, arrays are not objects either, but they are implemented as hash maps.
In Java, arrays are not objects, but they can contain objects. On the other side,Edit: See comment.ArrayLists are objects and can only contain objects.In JavaScript, everything but the primitive types are objects, also arrays.
You have to be careful to distinguish between the terminology of the language and the general data structure.