Write a Java function called SpOdd. The function takes an array of integers as input and return an array of integers with all odd numbers in original array. Keep the same order as the original array. Then test your function in main function. Sample output of main function: Original Array: [3, 8, 5, 7, 1, 9, 2] Odd elements in the array: [3, 5, 7, 1, 9] Please submit your java file
Write a Java function called SpOdd. The function takes an array of integers as input and return an array of integers with all odd numbers in original array. Keep the same order as the original array. Then test your function in main function. Sample output of main function: Original Array: [3, 8, 5, 7, 1, 9, 2] Odd elements in the array: [3, 5, 7, 1, 9] Please submit your java file
Related questions
Question
Can someone please explain to me ASAP??!!!
![Write a Java function called SpOdd. The function takes an array of integers as input and return an
array of integers with all odd numbers in original array.
Keep the same order as the original array. Then test your function in main function.
Sample output of main function:
Original Array: [3, 8, 5, 7, 1, 9, 2]
Odd elements in the array: [3, 5, 7, 1, 9]
Please submit your java file](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F11ad9986-04b0-4336-8340-a3038312afe8%2Feaf51af5-ef36-40fc-a1fe-962f08c2820c%2Fgx8h499_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Write a Java function called SpOdd. The function takes an array of integers as input and return an
array of integers with all odd numbers in original array.
Keep the same order as the original array. Then test your function in main function.
Sample output of main function:
Original Array: [3, 8, 5, 7, 1, 9, 2]
Odd elements in the array: [3, 5, 7, 1, 9]
Please submit your java file
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 5 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)