Computers and Technology
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]
]
*/

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 06:30, Knownothing
When early motion pictures played in movie theaters, they were often accompanied by live organ or piano music. which of the following are the most likely reasons that this happened? (select all that apply). the music was provided to distract audience members from the loud sounds made when filmstrips were changed. the music accompanied the movies because the movies were silent and audiences were used to hearing music during plays in theaters. the music usually was played before, and sometimes after the movie, as an alternative form of entertainment. the music viewers to interpret the dramatic action in the films.
Answers: 2
image
Computers and Technology, 25.06.2019 05:00, quintinlarrieu
Brad wants to buy flowers for his friend with 33 dollars. the daisies are 1 dollar each and the roses are 2 dollars each he buy 3 more daisies than roses how much did the roses cost
Answers: 2
image
Computers and Technology, 25.06.2019 07:00, joey4843
What statement would cause polarization
Answers: 1
image
Computers and Technology, 25.06.2019 09:20, abolton04
Part d: float check string has a method s. isdigit() that returns true if string s contains only digits and false otherwise, i. e. s is a string that represents an integer. write a function named float_check that takes one parameter that is a string and returns true if the string represents a float and false otherwise. for the purpose of this function we define a float to be a string of digits that has at most one decimal point. note that under this definition an integer argument will return true. remember “edge cases” such as “45.” or “.45”; both should return true. for example: float_check('1234') returns true float_check('123.45') returns true float_check('123.45.67') returns false float_check('34e46') returns false float_check('.45') returns true float_check('45.') returns true float_check('45..') returns false
Answers: 2
Do you know the correct answer?
Wrong answers will be removed and my points WILL be returned! Array Printer Program BRAINLIEST

Questions in other subjects:

Konu
History, 25.09.2021 05:10
Konu
Mathematics, 25.09.2021 05:10
Konu
Mathematics, 25.09.2021 05:10