Are arrays primitive data types?

CWC
2 Min Read

Though java may appear to be simple as it is claimed by vast majority but in reality, it can sometimes challenge you. They are some challenging things in java like arrays. You might think that you know everything concertinaing arrears in java. But just to speak out you don’t know. For example, are arrayed primitive data types? Such question can pin on the wall. Here I will a direction based on my experience

Are arrays primitive data types?

The question is basically clear as crystal. I haven’t possessed the capacity to discover an API for arrays (other than this Arrays, yet this equitable characterizes a cluster of static aide capacities for managing genuine arrays) if there is no class for it, this appears to propose that an array can’t be an Object.

However, the way that an array has public fields like length and methods that it can summon like .equivalents () and .clone () appear to recommend (firmly) the direct inverse.

What is the clarification for the odd introduction and conduct of primitive arrays?

I performed an experiment to test whether if an array can be used as a primitive data type, As a note, I attempted to utilize the “Open Implementation” Eclipse feature on the .clone () method of an array seconds ago, trusting that I would have the capacity to take a gander at where and how this method was characterized (since it said int [] abrogated it from Object), yet it really made my whole Eclipse solidify up and crash…

Final note

so give my final conclusion based on what I did myself on eclipse I can say that array can be used as primitive data ties but not applied as objects. Though not used as an object but when used as a primitive data type it treats it like an object.enjoy your java programming

Share This Article
Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

English
Exit mobile version