public static void readNumbersArray()
    {
        //  prompt the user to enter their name
        System.out.println("Enter numbers array:");

        Scanner scanner = new Scanner(System.in);

        java.util.List<Integer> numbers = new ArrayList<Integer>();

        while(scanner.hasNextInt())
            numbers.add(scanner.nextInt());

        int[] numArray = new int[numbers.size()];
        int i = 0;

        for(Integer num : numbers)
        {
            numArray[i] = num;
            ++i;
        }

        flushNoneZerosLeft(numArray);

        System.out.println("New array is:");

        for(int k = 0; k < numArray.length; ++k)
            System.out.print(numArray[k] + " ");
    }