1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Karo-lina-s [1.5K]
4 years ago
14

Write a method called shifiLeft that takes a 2D array (that could be jagged) as an input and returns the same array with the ele

ments shifted to the left by one position. The first element of the first row goes to the end of the last row. For example: input { {1, 2, 3}, output: { {2, 3, 4}, {4}, {5}, {5, 6, 7, 8}, {6, 7, 8, 9}, {9, 10}1 {10, 1}1
Computers and Technology
1 answer:
kumpel [21]4 years ago
8 0

Answer:

Check the explanation

Explanation:

public static void main(String[] args){

     int[][] twoDimenArray = new int[2][];

     //first row has 3 columns

     twoDimenArray[0] = new int[3];

     

     //second row has 4 columns

     twoDimenArray[1] = new int[4];

     int counter = 0;

     //initializing array

     for(int row=0; row < twoDimenArray.length; row++){

   

        for(int col=0; col < twoDimenArray[row].length; col++){

           twoDimenArray[row][col] = counter++;

        }    

     }

     //printing array

     for(int row=0; row < twoDimenArray.length; row++){

        System.out.println();

        for(int col=0; col < twoDimenArray[row].length; col++){

           System.out.print(twoDimenArray[row][col] + " ");

        }    

     }

  }    

}

<u>Output </u>

0 1 2  

3 4 5 6

You might be interested in
Is a protocol that allows users to log on to and access a remote computer?
kompoz [17]
The answer is yes I hope this help ya out

6 0
3 years ago
Why is time management considered a soft skill
FinnZ [79.3K]
This is due to the simple fact that time management helps you not only get things done for yourself, but also not get in the way of others and let them get things done for themselves. It's like working in harmony.

Hope this helps! <3
5 0
3 years ago
Read 2 more answers
While your hands are on home row, your left hand rests lightly on _____.
In-s [12.5K]
The answer is b. asdfc.  
8 0
3 years ago
Read 2 more answers
What type of media is a hard disk​
anyanavicka [17]

Answer:

A hard disk provides a high-capacity alternative to magnetic storage media. It contains metal platters coated with a magnetic layer. The platters usually spin continuously when a computer is on, storing data in different sectors on the magnetic disk.

Explanation:

5 0
3 years ago
Which subunit of a heterodimeric cdk is the regulatory subunit?
Lemur [1.5K]
The answer is cyclin subunit
8 0
2 years ago
Other questions:
  • Write a MIPS assembly language program that prompts for a user to enter how many floating point numbers to enter, then prompts t
    10·1 answer
  • "The pkill command terminates _________."
    14·1 answer
  • Apple was a pioneer in user interface development, introducing the _____, complete with mouse and screen icons, in the early 198
    7·1 answer
  • Which feature enables you to make changes to all the slides of your presentation at the same time?
    15·2 answers
  • Write a program that reads students’ names followed by their test scores. The program should output each student’s name followed
    13·1 answer
  • When installing a device driver, start the computer in
    6·1 answer
  • What is the difference between the flip horizontal and the flip vertical option
    8·1 answer
  • Brian gathers data from his classmates about the computers they own such as the type of operating system, the amount of memory,
    11·1 answer
  • ________________, _______________ and ___________ are what you see when you open Excel
    14·2 answers
  • Write any two rules for writing algorithm​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!