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
Lyrx [107]
4 years ago
9

Write a method called printReverse that accepts a String as its parameter and prints the characters in opposite order. For examp

le, a call of printReverse("hello there!"); should print the following output: !ereht olleh If the empty string is passed, no output is produced. Your method should produce a complete line of output.
Computers and Technology
1 answer:
Eddi Din [679]4 years ago
8 0

Answer:

//Method to reverse user text

public static void printReverse(String text) {

 //Create a variable to hold the reversed string

 //Initialize it to an empty string

 String reversedText = "";

 

 //Create a loop that cycles through each character in the text string

 //Prepend each character to the reversedText string

 for(int i=0; i < text.length(); i++) {

  reversedText = text.charAt(i) + reversedText;

 }

 

 //Display the reversed text

 System.out.println(reversedText);

 

}

Explanation:

Explanation has been given in the code in form of comments.

Hope this helps!

You might be interested in
What are workplace human relations
snow_lady [41]

Answer:

Relationships between employees and management are of substantial value in any workplace. Human relations is the process of training employees, addressing their needs, fostering a workplace culture and resolving conflicts between different employees or between employees and management.

3 0
3 years ago
Which of the following is the java keyword used to declare a class
tekilochka [14]
Class is the java keyword used to declare a class
6 0
3 years ago
Companies use virtualization to do all of the following except:
dangina [55]

Answer:

c)

Explanation:

Virtualization refers to running a virtual instance of a computer system apart from the actual software. Companies use this virtualization to do all of the following except Reduce the amount of applications in corporate datacenters. Instead few systems have the applications and those systems are cloned through virtualization.

4 0
3 years ago
A developer of a relational database refers to a file as a
goldenfox [79]
This is the correct Answer    <span>Attribute</span>
5 0
3 years ago
Trisha's computer kept rebooting frequently. Therefore, she decided to call customer support. When he was checking the computer,
harkovskaia [24]
Answer: F10 or delete key. when you click these keys they usually will take you to the bios to look over the computers system to make sure that everything is working properly.
7 0
3 years ago
Other questions:
  • The first thing to do when your computer gives you a error message is
    7·2 answers
  • In Rizzati Corp, vice presidents in departments such as engineering, manufacturing, IT, and human resources report directly to t
    15·1 answer
  • Given an list of N integers, Insertion Sort will, for each element in the list starting from the second element: Compare the ele
    8·1 answer
  • 3. Find the product of (a² +3a+5) x (a+7)​
    7·1 answer
  • You can view information for the individual people who will perform the tasks on theproject in the
    7·1 answer
  • Which terms represent the two types of client requirements?
    14·1 answer
  • Which note taking strategy has you divide a page into 3 sections for your notes, key points, and summary?
    11·1 answer
  • When the Hyper-V role is added to a Windows Server 2016 server, the hypervisor creates the individual environments, each of whic
    5·1 answer
  • How did transistors revolutionize the world of computers?
    15·1 answer
  • How to remove a course from your canvas calander feed.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!