amayaiscool9234 amayaiscool9234
  • 09-11-2020
  • Computers and Technology
contestada

Write a statement that calls the recursive method backwardsAlphabet() with parameter startingLetter.

Respuesta :

barackodam barackodam
  • 10-11-2020

Answer:

Explanation:

public class RecursiveCalls {

public static void backwardsAlphabet(char currLetter) {

if (currLetter == 'a') {

System.out.println(currLetter);

}

else {

System.out.print(currLetter + " ");

backwardsAlphabet(--currLetter);

}

return;

}

public static void main (String [] args) {

char startingLetter = '-';

startingLetter = 'z';

// Your solution goes here

backwardsAlphabet(startingLetter);

return;

}

}

Answer Link

Otras preguntas

In 1215 English Nobles forced King John to sign the Magna Carta in order to restrict his power and restrict certain rights to the people True or false?
What is slowed when water is a limiting factor in an environment? a. amount of evaporation b. population growth c. the types of rocks
Does darker skin color make it easier to live under sun?
Two ways social factors can affect individual views on death and dying
Carl Dove 617.3 miles his car gets about 41 miles per gallon.which is the best estimate of how many gallons of gas Carl used
amount of time needed for ecosystem recovery
Explain why the process of decay are so important in keeping the soil fertile?
Why did abiogenesis only happen once?
Write an expression that is equivalent to 3/4(5z+16).
example for active & passive voice? ?