Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help. 1. DeclareAndInitialize Method (a) Declare an array with n elements (where n is the integer parameter for this method) and initialize the

image text in transcribed

I need help.image text in transcribed

1. DeclareAndInitialize Method (a) Declare an array with n elements (where n is the integer parameter for this method) and initialize the array with numbers n through 1 in descending order (n, n-1, ... , 2, 1). (b) Create an ArrayList with n elements, n through 1, in descending order. 2. Set To42 Method (a) Change the method signature so that it takes in an integer array. (Do not include any other parameters) (b) Set the last integer in that array to 42. (c) Change the method signature again so that the method returns an integer array. (d) Return the array that has 42 as the last integer. 3. Set To 24 Method (a) Change the method signature so that it takes in an ArrayList. (Do not include any other parameters) (b) Change the value of the oth element in that ArrayList to 24. (c) Change the method signature again so that the method returns an ArrayList. (d) Then return the ArrayList that has 24 as the oth element 1. Print Method Change the method signature so that it takes in an Array AND an ArrayList, then print out both one after the other

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

Step: 3

blur-text-image

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

Database Design Using Entity Relationship Diagrams

Authors: Sikha Saha Bagui, Richard Walsh Earp

3rd Edition

103201718X, 978-1032017181

More Books

Students also viewed these Databases questions