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, 23.06.2019 03:30
In vista and windows 7, the appearance and personalization option allows you to change the
Answers: 1
question
Computers and Technology, 23.06.2019 12:30
Animations and transitions are added from the
Answers: 1
question
Computers and Technology, 23.06.2019 13:00
Donnie does not have powerpoint. which method would be best for elana to save and share her presentation as is? a pdf a doc an rtf a ppt
Answers: 3
question
Computers and Technology, 23.06.2019 20:30
If an appliance consumes 500 w of power and is left on for 5 hours, how much energy is used over this time period? a. 2.5 kwh b. 25 kwh c. 250 kwh d. 2500 kwh
Answers: 1
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
Computers and Technology, 15.02.2020 23:13
Questions on the website: 13722362