Question: 1: Array of Integers, Reverse Sort, Print elements values using for loop Declare an array of integers named intArray and allocate memory for 5 integer
1: Array of Integers, Reverse Sort, Print elements values using for loop
Declare an array of integers named intArray and allocate memory for 5 integer types
Initialize the array elements with integer values (100, 1000, 23, 555, 356) using the Integer type not int.
Reverse sort the array intArray elements and print each array element out using iteration (loop)
You will need to import the Collections class and Arrays class to perform the reverse sort.
2: Array of chars, Sort, Print elements values using a for loop
Declare an array of chars named charArray and allocate memory for 5 char types
Initialize the array elements with char values (characters G, E, Q, A, Z)
Sort the array charArray elements and print each element out using iteration (loop)
3- Array of floats, Sort, Print elements values using a for loop
Declare an array of floats named floatArray and allocate memory for 5 floats
Initialize the array elements with float values (10.0, 32.5, 22.2, 99.1, 90.5)
Sort the array floatArray elements and print each element out using iteration (loop)
4: Multidimensional array, Print elements values using a for loop
Declare a multidimensional array of integers named multiArray and allocate memory for 3 X 5 integers
Initialize the array elements with int values (row 1 = 1-5, row 2 = 11-15, row 3 = 21-25)
Print each row element out using a nested loop
PLEASE USE CORRECT SPACING AND HAS TO BE DONE IN LINUX SYSTEM
thank you
3 1000 356 100 23 10.0 22.2 32.5 90.5 99.1 12 13 14 15 21 2.3 24 25Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
