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, 22.06.2019 02:00
Aisha has finished working on a word processing document that contains 15 pages. she has added some special elements in the first three pages, page 9 and 10, and page 15 from the document. she wants to print only these pages to see how they look. which option is the correct way to represent (in the print dialog box) the pages that aisha wants to print?
Answers: 1
question
Computers and Technology, 23.06.2019 19:00
Choose the correct citation for the case which established the "minimum contacts" test for a court's jurisdiction in a case. select one: a. brown v. board of education of topeka, 347 u.s. 483 (1954). b. international shoe co. v. washington, 326 u.s. 310 (1945) c. haynes v. gore, 531 u.s. 98 (2000). d. international shoe co. v. washington, 14 u.s. code 336.
Answers: 1
question
Computers and Technology, 24.06.2019 05:30
How do i get rid of my member ship for
Answers: 2
question
Computers and Technology, 24.06.2019 09:10
  to change the number of rows and columns displayed by the excel object a. select the object and drag a size handle on the active object. b. deselect the object and drag a size handle of the object. c. deselect the object and drag a row or column divider of the object. d. select the object and drag a row or column divider on the active object.
Answers: 2
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
Mathematics, 10.11.2020 20:30
question
Physics, 10.11.2020 20:30
question
Biology, 10.11.2020 20:30
question
Mathematics, 10.11.2020 20:30