subject
Computers and Technology, 04.03.2021 06:30 bnnn

Wrong answers will be removed and my points WILL be returned! Array Printer Program BRAINLIEST
1. Start a program in a class named ArrayPrinter. Ignore the "main" method for a moment.
2. In your class, create a 'static' method named 'PrintArray' with one parameter of type 'int[]' named 'arr'. Inside this method, do the following.
2A. Keep all of your output in this method on one line using 'System. out. print()' until directed to use printLn().
2B. Display an opening square bracket character.
2C. Loop through the array that was passed into the method, display the values in the array. Add a comma and a space after every volume.
2D. Using the 'System. out. prinLn()', display a closing bracket.
3. In your main method, add the follwing. Pass the reference to this array to the printArray method, run your program, and verify that it works as expected.
int [] oneD = {5, 6, 7, 8};
4. In your main method, add a blank 'println()' statement after the method call you just made.
5. Also, in the class make an overloaded ' static' method named 'printArray' with one parameter of type 'int [][]' named 'arr'.
Do this inside the method:
A. Using 'printLn()', display an opening square bracket.
B. Loop through the two-dimensional array that was passed into the method.
i. First, use System. out. print() , display two space characters.
ii. Every element of this two dimensional array that you're looping through is a one-dimensional array of int. Call the other 'printLn()' nethod and pass to it each one-dimensional array in the two-dimensional array.
C. using printLn(), display a closing square bracket.
6. In your main method, create the following two-dimensional array.
int [] [] twoD = { {2, 4, 6, 8},
{8, 7, 9, 1},
{3, 5, 1, 2} };
7. In your main method, add a blank println() statement after the method call you just made.
8. In your main method, create the following ragged 2D array. Pass the reference to this Array to the printArray method, run your program and verify it works as expected.
9 Trouble shoot and fix any errors that occur
int [] [] twoD2 = { {1, 2}, {3, 4, 5} , {6}, {7, 8, 9} }:
Now after you run this 3 times in eclipse( or any software) copy the output shown and then add the text you add and the output text
/* Results;
[5, 6, 7, 8]
[
[2, 4, 6, 8]
[8, 7, 9, 1]
[3, 5, 1, 2]
]

[
[1, 2]
[3, 4, 5]
[6]
[7, 8, 9]
]
*/

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 22:30, jacob7542
The qwerty keyboard is the most common layout of keys on a keyboard
Answers: 3
image
Computers and Technology, 23.06.2019 05:00, sharkboy578
Acompany is inviting design for its new corporate logo from its users. this is an example of ? a. crowdfunding b. crowdvoting c. crowdsourced design d. crowdtracking
Answers: 3
image
Computers and Technology, 23.06.2019 16:00, CalCDanG
What is the biggest difference between section breaks and regular page breaks? section breaks are more difficult to add than page breaks. section breaks make it easier for you to view the document as an outline. section breaks allow you to have areas of the document with different formatting. section breaks are smaller than regular page breaks.
Answers: 2
image
Computers and Technology, 24.06.2019 01:30, Cinders13
How can you make your column headings stand out?
Answers: 1
You know the right answer?
Wrong answers will be removed and my points WILL be returned! Array Printer Program BRAINLIEST

Questions in other subjects:

Konu
Biology, 11.03.2021 04:20
Konu
Physics, 11.03.2021 04:20
Konu
Spanish, 11.03.2021 04:20
Konu
History, 11.03.2021 04:20