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
Electromagnetic waves used in ovens and cell phone communications are called
Lera25 [3.4K]
<span>Microwaves are what  their called but im not for sure</span>
5 0
3 years ago
ou work as network administrator for an organization that has a Windows-based network. You want to use multiple security counter
kolezko [41]

Answer:

The three components used by defense in depth strategy are:

1) Physical controls

2) Technical controls

3) Adminstrative controls

Explanation:

Defense in depth is a strategy using multiple security measures to protect to protect the integrity of information. Today's cyberthreat are evolving and growing rapidly. Defense in depth is a solid, comprehensive approach to utilizing a combination of advanced security tools to protect critical data and block threats before they reach endpoint.

If one line of defense is compromised, additional layers of defense are in place to ensure that cracks don't slip through the cracks.

Defense in depth strategy uses three components which are:

* physical controls: are anything that physically limits or prevents access to IT systems. Examples are security guards and locked doors.

* Technical controls: are hardware or software whose purpose is to protect systems and resources. Examples are disk encryption, fingerprint readers and authentication.

* Adminstrative controls: are an organization's policies and procedures which ensures that there is proper guidance are available in regards to security and that regulations are met. Examples are hiring practices and data handling procedures.

8 0
3 years ago
What is the encryption cipher that was the precursor to des??
Elanso [62]
DES works by using the same key to encrypt and decrypt a message, so both the sender and the receiver must know and use the same private key. Once the go-to, symmetric-key algorithm for the encryption of electronic data, DES has been superseded by the more secure Advanced Encryption Standard (AES) algorithm.
8 0
3 years ago
Enterprise systems help managers and companies improve their performance by enabling them to __________.
Sonbull [250]

Answer: b)seamlessly share real-time data internally among departments and with external business partners.

Explanation: Enterprise system are type of software section that provides the facility of controlling and tracing of the operation in business organizations.They helps in making the business automatic, trading of data in different organization sectors internally and externally as well, reporting etc.

Other options are incorrect because it does not transfers the data using emails,outsourcing the process to vendors and combining data into central hub.Thus, the correct option is option (b).

4 0
3 years ago
The part of the poppet valve that contacts the valve seat is called the?
Amiraneli [1.4K]
C. is the correct answer
6 0
3 years ago
Read 2 more answers
Other questions:
  • What type of lights are necessary for silhouettes?
    12·2 answers
  • . Does Zuckerberg believe in the thought that “the endpoint is when you sell the
    15·1 answer
  • What is ucspi-tcp pakage in qmail??
    5·1 answer
  • HI GIVING BRAINLIEST Tyra used the software development life cycle to create a new game. She released it to her friends in order
    14·2 answers
  • How do you know if your phone has a virus?
    13·1 answer
  • what version of the internet do we use as an interactive social system in which users are able to interact with senders
    7·1 answer
  • What is the IEEE 802 standards name for a wireless network that is limited to one person's workspace?
    14·1 answer
  • Write an application named Hurricane that outputs a hurricane’s category based on the user’s input of the wind speed. Category 5
    7·1 answer
  • A natural language processor comes across a sentence that contains the word “weightless.” The morphology component identifies th
    10·2 answers
  • you are investigating the use of website and url content filtering to prevent users from visiting certain websites. which benefi
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!