I think you got me wrong. I know that Arraay don`t ovverride the toString Method. Anyway the Java Specification says that the toString Method returns a String Represantation of the Object wich is Classname@hashcode. There are also these Questions with Arraylists wich inherits toString from AbstractCollection.
My point is in my opinion an Array of int arrays holds int array ,not int values. So the elements of int arr, are Arrays that holds int's.
I know how to get all the numbers of the inner Arrays. But I want to know what, according to oracle, is the correct definition of an element in an array.
I don't think I'm not ready for the OCA, but if you think you should blame me for this question, feel free to do it again
Maybe you should read the Documentation that you are sharring.
Elements are converted to strings as by String.valueOf(Object), unless they are themselves arrays.
If an element e is an array of a primitive type, it is converted to a string as by invoking the appropriate overloading of Arrays.toString(e). If an element e is an array of a reference type, it is converted to a string as by invoking this method recursively.
So the elements of multidimensional Arrays are Arrays
Sorry for causing any annoyance; maybe the question wasn't clear about what they wanted. Was your suggestion given as a possible solution?
I would have interpreted the question as meaning to print the individual numbers. That appears to match what it says in the Java® Language Specification (=JLS), where the element type of an int would be regarded as int. That link calls the ints the components of the array. It says that element types are not array types.
Self destruct mode activated. Instructions for deactivation encoded in this tiny ad.