I'm trying to print the values but it just comes out as one string on binary numbers.

What do I need to change?
Thanks!

import java.util.*;

public class lab5 {

    public static void main(String[] args) {
        Random random = new Random();
       // int [] unsorted_array = new int [1000];
       // int [] sorted_array = new int [1000];
        ArrayList unsorted = new ArrayList(),
               sorted = new ArrayList();

        for(int count = 0; count <= 1000; count++){
            int rand = random.nextInt(10000)+1;
            System.out.println(rand);

            unsorted.add(rand);
            sorted.add(rand);

        }

        for( int i = 0; i< 1000; i++)
           System.out.print(unsorted.size());
  }

Ahhhh, figured it out! sorry!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.