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, 21.06.2019 18:30, bankzdown
The method of presentation refers to the planning process for the presentation. the information chosen for the presentation. how the presentation topic will be introduced. how the presentation will be delivered.
Answers: 1
image
Computers and Technology, 22.06.2019 02:00, aredwolf2017
When jen is planning to upgrade to a monitor with a better resolution, what should she be looking for in the new monitor?
Answers: 1
image
Computers and Technology, 22.06.2019 02:40, lizzlegnz999
Respecting individual differencespre-test active2time remaining48: 47nina is exploring her gender identity and sexual orientationwhich best describes how the role of the media might influence nina during this time in her life? the media would her decide because television shows are always unbiased about gender issues and do notstereotypethe media could make things difficult for her because television sometimes portrays rigid ideas about gender roles. all forms of media will her decide because the media always portrays rigid ideas about gender roles. all forms of media will make things easy for her because the media always portrays open and fair ideas about gender roles.
Answers: 1
image
Computers and Technology, 22.06.2019 10:30, darrengresham999
Choose the best explanation for the following statement communication is symbolic
Answers: 3
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
Mathematics, 05.01.2021 08:40
Konu
Mathematics, 05.01.2021 08:40
Konu
English, 05.01.2021 08:40