I'm trying to take numbers (integers) from a website and put them into an array for further manipulation. Here is what I have so far
import java.io.IOException;
import java.net.URL;
import java.util.Scanner;
public class Scores {
public static void main(String[] args) throws IOException{
URL url = new URL("http://cs.armstrong.edu/liang/data/Scores.txt");
Scanner input = new Scanner(url.openStream());
int []score = new int [100];
int i = 0;
while (input.hasNextInt()) {
score[i++] = input.nextInt();
System.out.println(score);
}
}
}
The problem is all of the numbers in the array come back as [I@6bc7c054, any help would be appreciated.