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
A commercial depicts a teenager on a skateboard vandalizing a brick wall. This is an example of:
Olenka [21]
Crime. Because vandalizing is a crime. And maybe in the commercial the narrator will say something like don't do crime or something.
6 0
3 years ago
Read 2 more answers
How does 5G technology enhance the Internet of Things (ioT) ?
Naddik [55]

Answer:

Internet of Things are everyday items that uses the internet, 5G internet enhances the internet service allowing you to connect, receive, or send information in places where internet would usually be slower like crowded areas. Through antennas using spectrum which carries information through different types of waves, it overall makes the internet service better, making the appliances on that internet service faster.

Explanation:

Internet of Things are basically any everyday item that has software that connects to the internet, in which that item sends or even receives data from it connecting to different servers using an internet service.

5G is a 5th generation technology that also connects to servers through an internet service. This 5G technology allows the items to receive information faster, which overall approves the internet service. One of the proud examples of 5G technology is our modern-day phones/appliances. 5G technology allows you to connect to an internet service and send information or receive information faster than 4G technology.

For your answer, since "internet of things are everyday items that uses the internet, 5G internet enhances the internet service allowing you to connect, receive, or send information in places where internet would usually be slower like crowded areas. Through antennas using spectrum which carries information through different types of waves, it overall makes the internet service better, making the appliances on that internet service faster."

Hope this helps.

4 0
2 years ago
lance measured 0.485 liter of water. Angel measured 0.5 liter of water. lance said, "My beaker has more water than yours because
nikdorinn [45]
No, if we were to make the decimal for angel it would be 0.500 which is more than lance, you can also round them
4 0
3 years ago
Read 2 more answers
Write at least and explain four types of escape sequences and create an example in an IDE which consist of the mentioned escape
slamgirl [31]

Answer:

- \' is used to escape a single quote in a string enclosed in single quotes like;

my_string = 'this is John\'s ball'.

- \n is used to jump to a new line, Eg;

my_string = "Johns is a good boy\nbut he hates going to school."

the next set of the string after the '\n' character is displayed on the next line.

- \t is used to add a tab space to a string.

my_string = 'Jane is \thungry'

the character adds four character spaces before the word 'hungry'.

- \r adds a carriage return (or enter in keyboards) to start a new block paragraph in a string.

my_string = "Johns is a good boy\rbut he hates going to school."

Explanation:

Escape sequences in programming are used to format strings or output syntax of a program. They always begin with the backslash. Examples of escape sequence are " \' ", "\n", "\t", "\r", etc.

5 0
3 years ago
A numeric test score is to be converted to a letter grade of A, B, or C according to the following rules: A score greater than 9
arlik [135]

The code segment makes use of conditional statements.

Conditional statements in programming are used to make decisions

The code segment in C++ is as follows

if (score > 90) {

grade = 'A';

}

else if (score >= 80 && score < =90) {

grade = 'B';

}

else {

grade = 'C';

}

The above code segments take the score, make comparison, and then determine the appropriate letter grade.

Read more about code segments at:

brainly.com/question/20475581

7 0
2 years ago
Other questions:
  • katherine has work experience of seven years as a graphic designer and photographer. she wants to now redirect her career to web
    5·2 answers
  • What is the opportunity cost of computers when moving from point A to point B? -15 DVDs b. What is the opportunity cost of compu
    13·1 answer
  • Write a program that asks the user to input four numbers (one at a time). After the four numbers have been supplied, it should t
    6·1 answer
  • (70 points) This is a legit question that I have for a device FOR my homework.
    5·2 answers
  • Which screen should be open to customize or personalize a desktop background?
    15·2 answers
  • Define<br>output<br>devices<br>.<br>Give<br>any<br>three<br>examples<br>.<br>3.​
    8·2 answers
  • Create a function names minElement() that takes an array of numbers as a paaramter and returns the min value of the array. The a
    9·1 answer
  • What is processing requirement in computer?
    11·1 answer
  • What time is it NOW??
    11·2 answers
  • Rewrite the Espresso Counter program to Swap or interchange any two rows of the output. Copy and paste just the interchanged par
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!