subject
Computers and Technology, 04.01.2020 22:31 AdoNice

Ihave to write this in java, but i've never even learned it before and i'm completely lost
start a program in a class named arrayprinter. ignore the main method for a moment.
in your class, create a static method named printarray with one parameter of type int[] named arr. inside this method, do the following.

keep all of your output in this method on one line using system. out. print() until directed to use
display an opening square bracket character.
loop through the array that was passed into the method. display the values in the array. add a comma and a space after every value except the last one.
using system. out. display a closing square bracket character.
in your main method, create the following array. 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};
in your main method, add a blank println() statement after the method call you just made.
in the class, create an overloaded static method named printarray with one parameter of type int[][] named arr. inside this method, do the following:
using display an opening square bracket character.
loop through the two-dimensional array that was passed into the method.
first, use system. out. print() to display two space characters.
every element of this two-dimensional array that you are looping through is a one-dimensional array of int. call the other printarray method and pass to it each one-dimensional array in the two-dimensional array.
using display a closing square bracket character.
in your main method, create the following two-dimensional array. pass the reference to this array to the printarray method, run your program, and verify that it works as expected.
int[][] twod = {{2, 4, 6, 8},
{8, 7, 9, 1},
{3, 5, 1, 2}};
in your main method, add a blank println() statement after the method call you just made.
in your main method, create the following ragged two-dimensional array. pass the reference to this array to the printarray method, run your program, and verify that it works as expected.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 00:30
Knowing that the central portion of link bd has a uniform cross sectional area of 800 mm2 , determine the magnitude of the load p for which the normal stress in link bd is 50 mpa. (hint: link bd is a two-force member.) ans: p = 62.7 kn
Answers: 2
question
Computers and Technology, 23.06.2019 14:00
Select the correct answer. andre was recently hired by an organization to check for system vulnerabilities. he is supposed to exploit these vulnerabilities and create a report on the extent of damage to which the system was susceptible. what position does andre hold in this organization? a. information security analyst b. information assurance manager c. penetration tester d. network security engineer e. chief information security officer
Answers: 2
question
Computers and Technology, 24.06.2019 01:00
The initial tableau of a linear programming problem is given. use the simplex method to solve it. x 1 x 2 x 3 s 1 s 2 z 1 2 4 1 0 0 8 3 4 1 0 1 0 10 minus3 minus12 1 0 0 1 0 the maximum is nothing when x 1equals nothing, x 2equals nothing, x 3equals nothing, s 1equals3, and s 2equals0. (be sure to simplify to lowest terms if necessary.)
Answers: 2
question
Computers and Technology, 25.06.2019 00:00
To remove text from a specific location and keep it to use again, you should select
Answers: 1
You know the right answer?
Ihave to write this in java, but i've never even learned it before and i'm completely lost
sta...
Questions
question
Chemistry, 02.09.2019 09:10
question
Social Studies, 02.09.2019 09:10
Questions on the website: 13722363