Question: Requirements: 1. Make a folder in the CodeHS Sandbox called CSE2120. All programs for this module should be saved in this folder. 2. Create a
Requirements:
1. Make a folder in the CodeHS Sandbox called "CSE2120". All programs for this module should be saved in this folder. 2. Create a new file. Ensure the program type is "Java: Console" if you want to use readLine() as an input command. 3. Submit your file by Sharing Your Program using the "show code" link. Solve each of the problems below. Ensure your code is readable with clear comments. Make an array containing (2, 4, 6, 8, 10} and assign it to firstArray in the run method. Then print out the elements at index 1 and index 3. Your output should be similar to: The element at index_is_. Make 4 empty arrays, each storing 3 values of a different data type (int, double, boolean, String). . Print out the default value stored in the array of each type. . Set the values of the integer array to be 5, 10, 15. Set the values of the double array to be 1.5, 2.0, 2.5 . Set the values of the boolean array to be false, false, true. . Set the values of the String array to be cat, dog, fish. Write a method that returns the length of an array. The signature of the method is: public int arrayLength(int[] array) . Write a method that returns the last element of an integer array. The signature of the method is: public int getLastElement(int[] arr)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
