subject

Write a method that accepts a string object as an argument and displays its contents backward. for instance, if the string argument is "gravity" the method should display "ytivarg". demonstrate the method in a program that asks the user to input a string and then prints out the result of passing the string into the method.
below is a start on the code
package chapter8;
import java. util. scanner ;
/**
* your name
* chapter 8
* programming challenge 1
* provide a short description
*/
public class backwardstring{
public static void main(string[] args) {
string input; // to hold input
// create a scanner object for keyboard input.
// get input
// call the method below to display the string backwards.
}
/**
* the backward method accepts a string as an argument, and displays it
*backwards.
*/
public static void backward(string str) {
//for loop to reverse the string and print it
for ( ){
}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:40
Sarah is having a hard time finding a template for her advertising business that she may be able to use at a later date and also make it available to her colleagues
Answers: 1
question
Computers and Technology, 22.06.2019 18:30
Kto rozmawia z clamentain przez krótkofalówke w the walking dead w 4 epizodzie
Answers: 1
question
Computers and Technology, 23.06.2019 07:30
What key should you press and hold to select and open multiple files at one time? enter alt control esc
Answers: 1
question
Computers and Technology, 23.06.2019 08:00
What is a scenario where records stored in a computer frequently need to be checked
Answers: 2
You know the right answer?
Write a method that accepts a string object as an argument and displays its contents backward. for i...
Questions
question
Mathematics, 20.02.2021 23:00
question
Mathematics, 20.02.2021 23:00
question
Chemistry, 20.02.2021 23:10
Questions on the website: 13722363