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
Alex73 [517]
3 years ago
8

Write method reverseString, which takes a string str and returns a new string with the characters in str in reverse order. For e

xample, reverseString("ABCDE") should return "EDCBA".
Complete the reverseString method below by assigning the reversed string to result.

/** Takes a string str and returns a new string

* with the characters reversed.

*/

public static String reverseString(String str)

{

String result = "";

return result;

}
Computers and Technology
1 answer:
son4ous [18]3 years ago
3 0

Answer:

The method written in Java is as follows:

public static String reverseString(String str){

    String result = "";

    int lentt = str.length();

    char[] strArray = str.toCharArray();

       for (int i = lentt - 1; i >= 0; i--)

           result+=strArray[i];

    return result;

}

Explanation:

This defines the method

public static String reverseString(String str){

This initializes the result of the reversed string to an empty string

    String result = "";

This calculates the length of the string

    int lentt = str.length();

This converts the string to a char array

    char[] strArray = str.toCharArray();

This iterates through the char array

       for (int i = lentt - 1; i >= 0; i--)

This gets the reversed string

           result+=strArray[i];

This returns the reversed string            

    return result;

}

<em>See attachment for full program that includes the main method</em>

Download txt
You might be interested in
You are reviewing the output of the show interfaces command for the Gi0/1 interface on a switch. You notice a significant number
harina [27]

Answer:

Collision or electromagnetic interference (EMI)

Explanation:

Some network cables connected to switch or router ports are prone to internal collision (between two frames or packets) and external collision with electromagnetic waves from other sources (EMI).

Electromagnetic waves are also known as radio waves or signals. When they are transmitted, the network cable acts as a receiver, the received signal interferes with the packet in the cable. This is why the cyclic redundancy check (CRC) throws an error.

6 0
3 years ago
Research at least two articles on the topic of managerial issues of a networked organization. Write a brief synthesis and summar
maw [93]

Answer:

Explanation below

Explanation:

Network organisations are those that is of a legal entity or independent company or a subsidiary business unit. These organisations can be an internal business unit acting as separate profit centres or a stable company that has outsourced its work.

Synthesis:

According to the articles "The top 3 network management challenges" and also "Problem Management in the Networking Environment" is that managerial issues like the problem diagnosis method itself can engage various stakeholders whose deeds need to be coordinated as well as tracked to confirm that the cost of study itself does turn into an issue along with that resolutions to problems are really discovered. An association expects its network to be  reliable, secure, flexible, expandable and cost-effective.

Relation:

Network security has had to adapt increasingly quickly, in order to keep up with the new ways that users and back-end systems work. Networks are growing not just in complexity, but also in size. As more and more functions converge onto data networks, the number of devices attached to the network grows, and therefore the number of switching and routing nodes in the network must also grow.Organizations need to attach more and more of their operations onto the data network – remote locations need connections into central sites; even locations with no staff need network links for surveillance cameras and/or environmental monitoring, and/or control of automated devices. An effective problem management is needed to handle the issues.

An effective problem management requires the integration of a number of different process groups and the ability to effect change in both the infrastructure and organizational behavior. Implementing a problem management strategy that achieves these goals needs careful planning and long-term commitment. Using external supplier relationships to make sure that the support required for both identifying problems and supporting the resolution is in place is also an integral part of the overall solution.

References: http://www.analytictech.com/mb021/virtual.htm

https://www.accyotta.com/assets/uploads/docs/Allied_-_AMF.pdf

7 0
4 years ago
What are the factors that affect self-confidence?
denis-greek [22]

Answer:

The factors that affect self confidence are not having enough faith in yourself and letting what others say about you put you down

Explanation:

Plz mark brainlest it will help me so much

5 0
3 years ago
Decimal numbers are based on __________.
Shtirlitz [24]
Decimals are based on the preceding powers of 10. Thus, as we move from left to right, the place value of digits gets divided by 10, meaning the decimal place value determines the tenths, hundredths and thousandths. A tenth means one tenth or 1/10. In decimal form, it is 0.1.
6 0
3 years ago
Organizational structures with one or more layers of authority between top-level management and employees are known as vertical
r-ruslan [8.4K]

The organizational structure described here, which is known as vertical organizational structure, is also commonly identified as tall organizations.

They usually have hierarchical structures, with the CEO being at the very top of the layer. Tall organization have multiple levels, compared to its counterpart, the flat organization or horizontal, which would only have one level.  

8 0
3 years ago
Read 2 more answers
Other questions:
  • Throwing an improperly drained oil filter into the trash dumpster is a violation that can carry heavy penalties. A) true b) fals
    7·1 answer
  • A name given to a spot in memory is called:
    5·1 answer
  • Write an original idiom that uses the word dog or dogs im in 4th
    5·2 answers
  • If a filesystem has a block size of 4096 bytes, this means that a file comprised of only one byte will still use 4096 bytes of s
    6·1 answer
  • ____ technology essentially takes the data to be transmitted and rather than transmitting it in a fixed bandwidth spreads it ove
    15·1 answer
  • What are some hazards of being an astronomer??
    6·1 answer
  • Indica si los elementos de las imagenes son una materia prima o un material elaborado
    12·1 answer
  • When locating and correcting accessibility issues for a document, you would click what first?
    11·1 answer
  • Identify and explain 4 traditional (old ways) marketing approaches used by University uses in reaching
    7·1 answer
  • What is the accurate description
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!