-2

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.

mpromonet
  • 11,326
  • 43
  • 62
  • 91
Zach Wirta
  • 15
  • 7

1 Answers1

0
System.out.println(score[i]);

you were printing the array itself

AbtPst
  • 7,778
  • 17
  • 91
  • 172