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
Create a function named CountVowels() that takes one parameter name epsilon
LenaWriter [7]

def CountVowels(epsilon):

   countNum = 0

   for x in range(len(epsilon)):

       letter = epsilon[x]

       if letter.lower() in "aeiou":

           countNum += 1

   return countNum

def ExtractOdds(zeta):

   result = ""

   for x in range(len(zeta)):

       if x % 2 == 1:

           result += zeta[x]

   return result

sentence_A = input("Enter a sentence: ")

sentence_B = input("Enter a sentence: ")

print(CountVowels(sentence_A))

print(ExtractOdds(sentence_B))

I hope this helps!

5 0
2 years ago
There are 40 houses if company y provides electricity to 2/5 of the houses how many houses as company y provide electricity to
yulyashka [42]
The article for the assignment I need help with part 2xexbixneixe
6 0
3 years ago
What type of servers are used to store recently accessed DNS records from other domains to avoid incurring the performance overh
Kruka [31]

The correct answer is B. Primary DNS Server.

DNS records are type of data that is equivalent to IP address where the website or domain is located.  DNS records are normally stored in DNS server in a raw or flat file. A host, using port number 53 will send a DNS request to the server. If the computer has stored it's data or record in it's database, it will automatically reply to the requesting host. Example: You typed in www.website.com, if you have a matching DNS record in your server, using an IP address, your server will reply and display the website.

8 0
3 years ago
Difference between system and software development life cycle
umka2103 [35]

Answer:

Software development life cycle is about building a software (“only”) in a phased approach systematically.

System development life cycle is about implementing hardware and software in a phased manner systematically.

Explanation:

Here both the hardware and the software is considered as a system.

Hope this helps!

3 0
3 years ago
Early in the history of technology, the development of tools and machines was based on _____ versus scientific knowledge as is d
Law Incorporation [45]

Answer:

Early in the history of technology, the development of tools and machines was based on technical know-how versus scientific knowledge as is done today.

Explanation:

In the era prior to technological development, men had a basic and at times rudimentary manufacturing development, based on artisan processes that developed their tools and machinery by hand, without any type of automation or mass production rules.

Thus, each part or tool was manufactured in a unique way, which required a broad mastery of the production process by the manufacturer. This is how the first professions began to emerge, such as blacksmiths for example, who mastered the technique of manufacturing different implements and carried them out without any scientific knowledge.

7 0
3 years ago
Other questions:
  • In Java :
    11·1 answer
  • _____ rows indicate that there is different formatting for odd and even rows.
    14·1 answer
  • The default color scheme is called ____.
    7·1 answer
  • How do you post a picture on brainly? How do you also lower the points to like 5,brainless to the first understandable answers
    10·1 answer
  • Which command will display each line in the text file based on the alphabet?
    10·1 answer
  • The design of a blog refers to:
    10·1 answer
  • What is the term used to describe the basic unit of data passed from one computer to another
    14·1 answer
  • I need help please !!!!
    12·1 answer
  • NEED HELP ASAP
    13·2 answers
  • If you want the input gear to spin in the same direction as the output gear you must use a _______ gear.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!