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]
3 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]3 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
// This class calculates a waitperson's tip as 15% of the bill public class DebugThree1 { public static void main(String args[])
DENIUS [597]

I added a decimal format to keep all decimals within the hundredths place. I also changed the calcTip method to void and the argument to a double. Void means the method doesn't return anything and changing bill to type double let's us pass numbers with decimals to the calcTip method. I hope this helps!

Download txt
4 0
3 years ago
Which programming languages is best for game development? ​
kvasek [131]

Answer:

JavaScript. .

HTML 5.

SQL.

Python. .

Explanation:

hold it helps◕‿◕

3 0
2 years ago
Which two statements describe features of an ipv4 routing table on a router? (choose two.)
solong [7]

The statements that describe features of an ipv4 routing table on a router include:

  • Directly connected interfaces will have two route source codes in the routing table.
  • If a default static route is configured in the router, an entry will be included in the routing table with source code.

It should be noted that the IPv4 route table is important for listing entries that are in the routing table.

The routing table of every router is unique and can be stored in the read access memory (RAM) of the device.

Read related link on:

brainly.com/question/24958077

7 0
2 years ago
A network is a group of two or more computers or devices connected together. To be able to connect, they each need a
Kay [80]
D. Internet service protocol (isp)
6 0
3 years ago
Read 2 more answers
Who is better at fortnite mc creamy or mau?
Mama L [17]

Answer:

neither

Explanation:

fortnite sucks

8 0
3 years ago
Read 2 more answers
Other questions:
  • What is the first step in the exchange between a web browser and a database?
    7·1 answer
  • When using vlookup, the _____argument is optional?
    8·1 answer
  • Plato Web Tech B Semester Test- I'll mark brainiest for answers to ALL
    9·1 answer
  • Cisco Next Generation Intrusion Prevention System (NGIPS) devices include global correlation capabilities that utilize real-worl
    9·1 answer
  • It is possible to make the document larger for viewing small text.<br><br> True<br> False
    15·2 answers
  • Which sentence is an example of an I-statement?
    6·1 answer
  • Superclass in python explanation
    7·1 answer
  • Send me the answers<br>​
    15·1 answer
  • In order to personalize your desktop, you may click on: Start&gt;settings&gt;Personalization . . .
    9·1 answer
  • A group of two or more computer systems linked together via communication devices is called:.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!