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
In order to be compliant with the NIST publications, policies must include key security control requirements. One of these key r
lesya692 [45]

Answer:

True

Explanation:

In order to be compliant with the NIST publications, policies must include key security control requirements. One of these key requirements includes certification and accreditation, which is a process that occurs after the system is documented, controls tested, and risk assessment completed. It is required before going live with a major system. Once a system is certified and accredited, responsibility shifts to the owner to operate the system is a true statement.

8 0
3 years ago
Rest or take a break every __ minutes when typing. Please help!
Talja [164]
Maybe like 3-5 I think im right
3 0
3 years ago
Read 2 more answers
Which type of service offers a preconfigured testing environment for application developers to create new software applications?
Vaselesa [24]

A type of service which offers a preconfigured testing environment for application developers to create new software applications is: B - Platforms as a Service (PaaS).

<h3>What is cloud computing?</h3>

Cloud computing can be defined as a type of computing service that requires the use of shared computing resources over the Internet, rather than the use of local servers and hard drives.

<h3>The categories of cloud service.</h3>

Generally, cloud computing comprises three (3) service models which includes the following;

  • Infrastructure as a Service (IaaS).
  • Software as a Service (SaaS).
  • Platform as a Service (PaaS).

In conclusion, a type of service which offers application developers a preconfigured hosting and testing environment to create new software applications is Platforms as a Service (PaaS).

Read more on Platform as a Service here: brainly.com/question/24233315

#SPJ1

6 0
1 year ago
A method a. may have zero or more parameters b. never has parameter variables c. must have at least two parameter variables d. m
Lynna [10]

Answer:

The answer is "Option a"

Explanation:

A method is a technique, that associated with both a message and an object. It includes information, behavior, and actions of an interface defining, how the object can be used, and wrong choices can be described as follows:

  • In option b, It includes parameters in the method.
  • In option c, It contains a parameter, that may be one or more.
  • In option d, It contains one parameter also.

5 0
3 years ago
The case states that google intended the limited initial rollout to be a beta test of google glass, meaning that the adopters we
tigry1 [53]

Google intended the limited initial rollout to be a test of google glass, that the adopters were Innovators. The initial rollout of Google Glass was limited, purposefully so as to set the price very high. This mean that only a selected few, and those with plenty of disposable income, would be the first to use these devices. Google required people to register for the chance to receive a set. Even if many would want to spend the money on these devices, Google allowed only a selected few to receive them.

7 0
3 years ago
Other questions:
  • Why is it more important now than ever before to know how to evaluate websites and other online sources of information?
    7·1 answer
  • Monetary Policy can be either Expansionary or Contractionary. Which of the following actions classify as Expansionary Monetary P
    7·2 answers
  • Changing the configuration of a database falls under which category of databaseâ administration?
    15·1 answer
  • The IT department sent out a memo stating that it will start delivering desktop computer interfaces through the IT data center v
    5·1 answer
  • Suddenly, though, just as the procedure was about to be relayed to the astronauts, the pressure . . . the temperature . . . drop
    5·2 answers
  • One of the functions of an IDE is to check for: flowchart errors. Syntax errors. memory errors X input and output.​
    12·2 answers
  • Uinjsiodj9fijsdiokjdwe0okakj09dw9j09jw09
    9·2 answers
  • Develop a stored procedure that will take a state abbreviation as a parameter and list the name of the state, vendor, and total
    9·1 answer
  • 20.
    8·1 answer
  • Record the issue of 4,000 shares of $5 par value common stock for $35000 cash
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!