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 16:00
Does read theory have answers keys ?
Answers: 1
question
Computers and Technology, 23.06.2019 18:30
Janice recently received her college degree and is looking for a job. she is worried that since she just finished school, she will be required to repay her perkins and direct subsidized loans immediately. janice pulls out the paperwork she signed and reviews it again for repayment information. after reading all of the information, janice discovers that
Answers: 2
question
Computers and Technology, 24.06.2019 05:30
Someone plzz me which of these defines a social search? a. asking a search engine a question that is answered by a real person on the other sideb. modifying search results based on popularity of a web pagec.modifying search results based on a ranking of a web page
Answers: 2
question
Computers and Technology, 24.06.2019 17:30
What is the next step if your volume does not work on computer
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, 15.04.2021 16:30
question
Chemistry, 15.04.2021 16:30
question
Chemistry, 15.04.2021 16:30
Questions on the website: 13722367