how to fill generated odd number in new array java?

I was given an assignment to create a array which generates 1000 random numbers, finds odd numbers then prints odd numbers. Then those generated odd numbers should be filled in a new array, say that, we have to create another array. One array captures 1000 arrays whilst printing only odd numbers. Then create second array which holds those generated odd numbers. Hers what i have written so far. I have problem. When a user enters 5 numbers, it generates 5 numbers, but doesnt print odd numbers.

import java.util.Scanner;
public class Array {

    public static void main(String[] args) {
        System.out.print("Please enter number : ");
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int[] t = new int[n];
        int i;
        // Loop to do Array 
        for (i = 0; i < t.length; i++) {
            t[i] = (int)(Math.random() * 999);
        }
        // Array which displays odd numbers 
        System.out.println("THese are the generated Odd numbers : ");
        for (i = 0; i < t.length; i++) {
            System.out.println(t[i]);
            t[i] = 2 * i + 1;
        }
        int array[] = new int[8];
        for (int a = 0; a < array.length; a++) {
            array[a] = a;
        }
    }

}
//so this code t[i] = 2 * i + 1; isnt the write place.

the output is as follows:
Please enter number : 5
THese are the generated Odd numbers :
131
42
685
806
668

how to fill generated odd number in new array java?