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
What number system is the basis for all of the powerful computers and electronic devices in the world?
labwork [276]

Answer:

Binary

Explanation:

3 0
3 years ago
All sensitive media on a laptop should be encrypted.
Inessa05 [86]

true very very true it could get stolen if not (well either way) but it is better encrypted

8 0
3 years ago
Which of the following is an object-oriented programming language?
Svetradugi [14.3K]

Explanation:

This is the correct answer

<h3>python</h3>
7 0
2 years ago
Write the definition of a method printdottedline, which has no parameters and doesn't return anything. the method prints to stan
oksian1 [2.3K]
Void <span>printdottedline()
{
   printf(".....\n");
}

</span>void printdottedline()
{
   printf(".....\n");
}
8 0
3 years ago
Which filter lets you improve an image's appearance by manipulating the look and depth of its surface?
serg [7]

Answer:

A

Explanation:

5 0
4 years ago
Read 2 more answers
Other questions:
  • How come the UAC pops up EVERY TIME after i gave it permission to make changes to my PC
    6·1 answer
  • If Number = 7, what will be displayed after code corresponding to the following pseudocode is run? (In the answer options, new l
    5·1 answer
  • A comma is also called a statement terminator. A. True B. False
    8·1 answer
  • True or false? pressing Ctrl and S is a shortcut for saving
    15·2 answers
  • A computer program uses 3 bits to represent integers. When the program adds the decimal (base 10) numbers 5 and 3, the result is
    6·1 answer
  • Difference between Hard copy and Soft copy?​
    13·1 answer
  • If you could pick xbox or playstation what would you pick?And why :)?
    11·2 answers
  • 1. The Bank manager is imposing a 10% interest rate on the new salary loan to every account in the BPI Family Bank. (ANSWER SHOU
    15·1 answer
  • PLEASE HELP
    12·1 answer
  • Using the _____, you can direct the browser to retrieve specific information about the URL, to reload the current page, or to lo
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!