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
Ps4 or xbox what do you have and why is your console better ​
bekas [8.4K]

Answer:

PS4

Explanation:

Cause its god

3 0
3 years ago
Read 2 more answers
¿Cuántos megabytes (MB) de capacidad tiene una memoria USB de 16 GB? el que me diga por que le doy una coronita
-Dominant- [34]

Answer:

16,384MB

Explanation:

1GB contiene 1024MB de capacidad. Si multiplicamos esto por 16 veemos que 16GB es igual a 16,384MB. Este seria el espacio exacto, aunque se dice que 1GB tiene 1000MB. Eso es por que la palabra Giga significa x1000 y el numero binario entero mas cercano a 1000 es 1024. Entonces los ingenieros usan este numero para representar la cantidad de espacio en un GB que tambien seria 2^{10}

7 0
2 years ago
Will give brainliest to whoever can answer all of these questions correctly.
babymother [125]

false

ppt

chips designed to preform a function

Apologize to the customer for the inconvenience and offer to refund his money or replace the item

OneDrive-CollegeWork-FreshmanYear-NameOfClass

true

Social networking

paragraph

true

complete fill

true


 

7 0
3 years ago
Read 2 more answers
What is is plagiarism?
STALIN [3.7K]
Plagiarism is taking the work of others word by word and saying that it’s yours.
5 0
3 years ago
Read 2 more answers
Which tool would be the best choice for removing and replacing the motherboard bios chip?
mamaluj [8]

An <u>IC extractor</u> would be the best choice for removing and replacing the motherboard bios chip.

<h3>What is a computer hardware?</h3>

A computer hardware can be defined as a physical component of an information technology (IT) or computer system that can be seen and touched.

<h3>The hardware components of a computer.</h3>

Some examples of the hardware components of a computer system and these include:

  • Random access memory (RAM).
  • Read only memory (ROM).
  • Central processing unit (CPU)
  • Keyboard
  • Monitor
  • Mouse
  • Motherboard bios chip

In Computer technology, an <u>IC extractor</u> would be the best choice for removing and replacing the motherboard bios chip.

Read more on motherboard bios chip here: brainly.com/question/17373331

#SPJ1

8 0
1 year ago
Other questions:
  • Describe your microsoft word skills that need to be improved upon the most.<br><br>​
    8·1 answer
  • A 16M X 16 main memory is built using 512K X 8 RAM chips and memory is word addressable.
    13·1 answer
  • How to calculate least count of a stopwatch
    8·1 answer
  • When creating loyal customers you must develop all of the following except: a. Smooth relationships b.customer marketing c. Dedi
    5·2 answers
  • Without this step of the problem solving process you might solve the wrong problem, not know where to start, or not know when yo
    7·1 answer
  • En una Memoria SD de 128 Gb, ¿Cuántas fotos en alta resolución de 16 Mb puedo almacenar?
    12·1 answer
  • Select the correct answer. Nancy has made a small web page with the new features of HTML5. She has to show this web page in scho
    9·1 answer
  • Please help me with coding!
    7·2 answers
  • A pointing device used mainly for computer games is known as
    15·1 answer
  • If you're connected to a switch and your NIC is in promiscuous mode, what traffic would you be able to capture
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!