+ 1

If a[ ] is an array then what does System.out.println(a) print ?

14th Oct 2018, 1:10 PM
NilishaB
NilishaB - avatar
2 Réponses
+ 1
Well the answer to this is: Class name@haschcode in hexadecimal form
14th Oct 2018, 1:12 PM
NilishaB
NilishaB - avatar
+ 1
If we try to print any reference variable internally, toString() will be called which is implemented to return the string in the above stated format👆.
14th Oct 2018, 1:14 PM
NilishaB
NilishaB - avatar