Arrays. Tasks
1. One-Dimensional Array of Type String
- Create an array of type String with size 7.
- Assign it the values of the days of the week.
- Print the value of the last element to the console.
Get the full solution on Patreon.
2. One-Dimensional Array of Type double
- Create an array of type double with a size of 4.
- Initialize it with any values using an initializer block.
- Print the value of the first element to the console.
Get the full solution on Patreon.
3. Two-Dimensional Array of Type String
- Create a String array of size 3x6.
- Initialize it with the following values: a1 a2 a3 a4 a5 a6b1 b2 b3 b4 b5 b6c1 c2 c3 c4 c5 c6
- Print the array.
Full solution on Patreon.
4. Two-Dimensional Array of Type char
- Create a 2D array of type char with size 4x2.
- Initialize it using an initializer block.
- Print the array values.
Full solution on Patreon.
5. Find Max and Min Values in Each Row of a 2D Array
- Create a 5x8 integer array and initialize it using an initializer block.
- Find the maximum and minimum values in each row and store them in a 5x2 array.
- Print the new array containing the max and min values.
Solution on Patreon.
6. Garland Simulation Using Arrays
Implement the LED running light task (Java Operators Garlanda) using arrays. Use the System.arraycopy(...)
method to simulate the scrolling effect.
Solution on Patreon.

Please log in or register to have a possibility to add comment.