I am new to java,I have created array which accepts 8 values. It's working fine,also accepting values but it's not displaying correct output on console,please help me what the problem can be ??
Here's my code,
import java.util.*;
public class array2
{
public static void main(String []args)
{
Scanner scan=new Scanner(System.in);
int[] nums=new int[8];
for(int count=0;count<8;count++)
{
nums[count]=scan.nextInt();
}
System.out.println(nums);
}
}