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]
3 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]3 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
Piers lives in an apartment and has an existing home television connection. He wants to subscribe to a high-speed internet conne
lina2011 [118]

Answer:

D. Wireless Network

Explanation:

A Wireless network has no need for cabling, trunking nor any heavy device installation. a Portable wireless device can solve his problem.

5 0
3 years ago
What would be the consequences if the Memory Manager and the
Ann [662]

Answer:

Result could be a memory leak or a spaceleak.

Explanation:

The result if a memory supervisor and a processor administrator quit conveying would prompt a negative result as they have to impart all together for the procedure manager to process the data that is being conveyed in and out.

3 0
3 years ago
What kind of skills does an electronics engineering tech need as requirement in the workplace?
eduard

Answer:

Electrical and electronics engineering technicians should also possess the following specific qualities: Logical-thinking skills. Electrical and electronics engineering technicians must isolate and then identify problems for the engineering staff to work on. They need good reasoning skills to identify and fix problems.

Explanation:

3 0
3 years ago
3.26 LAB: Leap Year A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate a
Tju [1.3M]

Answer:

year = int(input("Enter a year: "))

if (year % 4) == 0:

  if (year % 100) == 0:

      if (year % 400) == 0:

          print(str(year) + " - leap year")

      else:

          print(str(year) +" - not a leap year")

  else:

      print(str(year) + " - leap year")

else:

  print(str(year) + "- not a leap year")

Explanation:

*The code is in Python.

Ask the user to enter a year

Check if the <u>year mod 4</u> is 0 or not. If it is not 0, then the year is not a leap year. If it is 0 and if the <u>year mod 100</u> is not 0, then the year is a leap year. If the <u>year mod 100</u> is 0, also check if the <u>year mod 400</u> is 0 or not. If it is 0, then the year is a leap year. Otherwise, the year is not a leap year.

8 0
3 years ago
Read 2 more answers
HEY DO U LIKE TRAINS!
Triss [41]

Answer:

yes

Explanation:

yes

3 0
4 years ago
Other questions:
  • Charges of the opposite tend to repel each other.
    9·2 answers
  • Which of the following tasks would you most likely use a spreadsheet to complete
    15·1 answer
  • What is a mortgage?
    8·2 answers
  • You are an administrator for a large corporation and you are responsible for deploying computers often and quickly. Which server
    5·1 answer
  • How do you get free Wifi on your phone without paying
    6·1 answer
  • Your company leases a very fast internet connection and pays for it based on usage. You have been asked by the company president
    8·1 answer
  • 50 POINTS &amp; A FOLLOW!
    11·2 answers
  • In this project you will write a set of instructions (algorithm). The two grids below have colored boxes in different
    9·2 answers
  • Networks and the interconnectivity of media have affected our society in that:
    13·2 answers
  • Gavin is making a new logo for his business. He uses drawing software to create a unique. Which file format does he use to creat
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!