Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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,

image text in transcribedJAVA

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 9 For Linux UNIX And Windows Advanced Database Administration Certification Certification Study Guide

Authors: Roger E. Sanders, Dwaine R Snow

1st Edition

1583470808, 978-1583470800

More Books

Students also viewed these Databases questions

Question

What is conservative approach ?

Answered: 1 week ago