Java
2 questions. ( I will provide all the information to the prompts after the question is accepted. Once you send the code I will try, and I will see if it submits without error.
1.) Write a program that creates an array of size N filled with random values between 0 and N*2, and searches for a target value T.
2.) Write a program that prints from a list of produce (fruits, vegetables, spices) given some user-supplied interval. If the item is saffron, don’t print it. If the item is vanilla, end the printing.
Use Arrays.toString(produce) to print the initial list. Print the interval-driven list separated by commas (a comma at the end is okay). The interval must be between 1 and 26.