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
OlgaM077 [116]
3 years ago
6

Write a recursive method public static String reverse(String str) that computes the reverse of a string. For example, reverse("f

low") should return "wolf". Hint: Reverse the substring starting at the second character, then add the first character at the end. For example, to reverse "flow", first reverse "low" to "wol", then add the "f" at the end.
Computers and Technology
1 answer:
Aneli [31]3 years ago
5 0

Answer:

Explanation:

StringRecursiveReversal.java

public class StringRecursiveReversal {

   static String reverse1 = "";

   public static String reverse(String str){

       if(str.length() == 1){

           return str;

       } else {

           reverse1 += str.charAt(str.length()-1)

                   +reverse(str.substring(0,str.length()-1));

           return reverse1;

     }

   }

   public static void main(String a[]){

       StringRecursiveReversal srr = new StringRecursiveReversal();

       System.out.println("Result: "+srr.reverse("flow"));

   }

}

Output :

Result: wolf

You might be interested in
What should you do in order to have access to the header and footer tools? Open the View tab. Open the Page Setup dialog box. Op
Svetach [21]

Answer:

Step 1  - Open the View tab.

Step 2 - Open the Page Setup dialog box

Step 3 - Open the header and footer tool.

Step 4 - Click OK.

Explanation:

In order to access to the header and footer tools

Step 1  - Open the View tab.

Step 2 - Open the Page Setup dialog box

Step 3 - Open the header and footer tool.

Step 4 - Click OK.

4 0
2 years ago
In a ______________ graphic you can include text and pictures and you can apply colors, effects, and styles that coordinate with
DerKrebs [107]
In a presentation graphic
8 0
3 years ago
What are keywords? hep please give a good awncer
Anika [276]

Answer:

Keywords are words or phrases that describe content. They can be used as metadata to describe images, text documents, database records, and Web pages. ... Keywords are used on the Web in two different ways: 1) as search terms for search engines, and 2) words that identify the content of the website.

4 0
3 years ago
Read 2 more answers
Quickbooks online accountant firm users can use the quickbooks online advanced desktop app to access what types of client subscr
Leokris [45]

The type of the client subscription used is paid subscription.

<h3>What is Paid Subscription? </h3>

Paid Subscription refers to the payment made already on the product purchased or the services received. It is a kind of the recurring payment whose transactions repeat after a regular basis.

If the customer continue to receive  the service then he or she has to pay the subscription.

After paying the membership costs, customers of Quickbooks Online for accountancy firms can access the Quickbooks Online Advanced desktop application.

Learn more about Paid Subscription here:

brainly.com/question/13508895

#SPJ1

5 0
1 year ago
Is The answers the computer givesback​
Ivanshal [37]

Answer:

i think so if you have a question?????

Explanation:

diablo ka

8 0
2 years ago
Other questions:
  • What makes an active heat sink different from a passive heat sink?
    12·1 answer
  • A. true
    6·1 answer
  • What word describes the complexity of document
    13·1 answer
  • SQL a. has become the de facto standard database language b. can be used to define database systems c. both a. and b. d. none of
    10·1 answer
  • Write a java program which uses methods for calculating the sum of any 5 non-zero integer digits that are input. The program mus
    8·1 answer
  • EIPP:________.
    9·2 answers
  • During Iteration planning, the PO introduces multiple new stories to the team. After a lot of discussion, the team decides to in
    8·1 answer
  • What's the answer to this​
    7·1 answer
  • Help please! Coding!
    9·1 answer
  • Writing down your main ideas, subpoints, and supporting material, then using geometric shapes and arrows to indicate logical rel
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!