answer.
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]
2 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]2 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
Budget Analysis (use while loop) Write a program that asks the user to enter the amount that he or she has budgeted for a month.
Agata [3.3K]

Answer:

print('This program will help you determine whether you\'ve budgeted enough ' +

     'for your expenses. You\'ll just need to enter your budget and the ' +

     'cost of each of your expenses for the month and we will calculate ' +

     'the balance.')

budget = float(input('How much have you budgeted this month? '))

expenses = 0

check = 0

while check >= 0:

   check = float(input('Enter an expense amount or -1 to quit: '))

   if check != -1:

       expenses += check

balance = budget - expenses

if balance < 0:

   print('\nYou haven\'t budgeted enough. You\'re going to be $', \

         format(-1 * balance, ',.2f'), ' short this month.', sep = '')

elif balance == 0:

   print('\nBe careful. You\'ve budgeted just enough to make it through ' +

         'the month.')

else:

   print('\nYou will have $', format(balance, ',.2f'), ' extra this month.', \

         sep = '')

6 0
1 year ago
During the name resolution process, which technique is used to avoid congestion when querying a server
vekshin1

Answer:

"NOT lookup " is the correct approach.

Explanation:

  • This methodology significantly reduces the quantity of congestion of DNS messages on a certain file. The application establishes that whenever a question reaches if it is processed. Unless the file is loaded, then perhaps the response is returned with the cached cache.
  • Typically the name resolution occurs in something like a DNS File. The conversion usually occurs throughout this cycle from Username to IP, including IP via Username.
8 0
1 year ago
Import simplegui
victus00 [196]

Answer:

ooh....

Explanation:

For example, to convert from bar to pounds per square inch you would multiply by 100000 then divide by 6894.757. Or, multiply by 100000/6894.757 = 14.503774. So, to convert directly from bar to pounds per square inch, you multiply by 14.503774.

3 0
2 years ago
Which of the following option is correct about HCatalog?
adell [148]

Answer:

Option (3) is the correct answer of this question.

Explanation:

  • HCatalog makes available Hive metadata to users of other Hadoop applications, such as Pig, MapReduce and Hive. it offers interfaces for MapReduce and Pig so that users can read data from and write data to the Hive warehouse.
  • This means users don't have to care about where or in what format their data is stored. So we know this way that Hcatalog makes sure our data is secure.
  • Others option does not belong to Hcatalog so these options are incorrect .

8 0
2 years ago
Suppose your name was George Gershwin. Write a complete program that would print your last name, followed by a comma, followed b
NNADVOKAT [17]

Answer:

I will write the code in C++ and JAVA      

Explanation:

<h2>JAVA CODE</h2>

public class Main

{ public static void main(String[] args) {

       // displays Gershwin,George

     System.out.println("Gershwin,George"); }  }

<h2>C++ Code:</h2>

#include <iostream>

using namespace std;  

int main()

{  cout<<"Gershwin,George"; }    

// displays last name Gershwin followed by , followed by first name George

//displays Gershwin,George as output.

6 0
2 years ago
Read 2 more answers
Other questions:
  • U.S. industries like steel, computers, and energy need to be protected from foreign competition to ensure which of the following
    6·2 answers
  • Jack is an accountant. He can't access the spreadsheet software, which is installed on the server. What should Jack do?
    5·2 answers
  • A two-dimensional array can have elements of ________ data type(s).
    7·1 answer
  • What is the major function of the network access layer?
    5·1 answer
  • How frequently should computers containing ehr information be backed up?
    14·1 answer
  • While Angela is making modifications to Katie’s Word document, she would like to inform Katie of the reasoning for the change. W
    10·1 answer
  • Write a statement that assigns total_coins with the sum of nickel_count and dime_count. Sample output for 100 nickels and 200 di
    11·1 answer
  • Consider a set A = {a1, . . . , an} and a collection B1, B2, . . . , Bm of subsets of A (i.e., Bi ⊆ A for each i). We say that a
    12·1 answer
  • A variable like userNum can store a value like an integer. Extend the given program to print userNum values as indicated. (1) Ou
    15·1 answer
  • HELP 30 points and Brainliest.Type the correct answer in the box. Spell all words correctly.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!