+ 3

Output of array null?

why show the consule one array some thing strenge when dont clearify the index

23rd May 2018, 12:20 AM
Rahman Rezaie 🇦🇫
Rahman Rezaie 🇦🇫 - avatar
6 ответов
+ 3
int[] array = {3,4,1}; System.out.print(array); //output ????
23rd May 2018, 3:03 PM
Rahman Rezaie 🇦🇫
Rahman Rezaie 🇦🇫 - avatar
+ 3
do you have any resaon
23rd May 2018, 4:07 PM
Rahman Rezaie 🇦🇫
Rahman Rezaie 🇦🇫 - avatar
+ 2
tanx
24th May 2018, 2:30 AM
Rahman Rezaie 🇦🇫
Rahman Rezaie 🇦🇫 - avatar
+ 1
Can you show use the code ? Can you explain your question more ?
23rd May 2018, 3:00 PM
sneeze
sneeze - avatar
+ 1
Yes. Just being busy. Will answer later. What language do you use?
23rd May 2018, 4:37 PM
sneeze
sneeze - avatar
+ 1
Notice an array is a collection of elements. You can't say System.out.print(array); because array is an object You have to use the toString to export the elements of the array to a string or loop through all elements with a for-loop https://www.wikihow.com/Print-an-Array-in-Java https://code.sololearn.com/ct8c8zi0hkNN
23rd May 2018, 8:34 PM
sneeze
sneeze - avatar