I'm creating a method for a homework problem that returns the highest value in an array. I'm using a for
loop to input the numbers into the array. Here is what the input code looks like.
int[] array = new int [n];
for(i=0;i<array.length;i++){
array[i]=sc.nextInt();
System.out.println(array);}
When i run the program to try and see if there's anything wrong as a I go along I notice the array not returning the value I input into it. For example putting the number 12 it returns [I@6c80d028. I'm pretty new to java so I don't really know what's going on with the input. Is there any thing that can be done?