Question: JAVA 1. Write a loop that prints out the numbers at the odd indexes; so the output should be 8 6 4 2 int[]myList={9, 8,
JAVA
1. Write a loop that prints out the numbers at the odd indexes; so the output should be 8 6 4 2 int[]myList={9, 8, 7, 6, 5, 4, 3, 2, 1}; 2. Using an enhanced for loop, write a java code to find the sum of the elements in the array numbers. */ int[] numbers = {3, 4, 5, -5, 0, 12}; 3. Write a java code to find and print the sum and average of elements in a one- dimensional array using enhanced for loop. */ myArray[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; 4. /* Write a program to search for an element x=5 in an array aaa and display position of element xif found in the array. Otherwise, it returns the message Not Found. */ int [ ] aaa = {1, 2, 3, 5, 6, 8, 10}; 5. Complete the reverse method below that is intended to reverse the order of the received integer array argument, then displays the array content after applying the reversing process. */ public static void reverse(int a[]){}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
