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

How did Leonid Brezhnev demonstrate his use of the Brezhnev Doctrine? by signing the SALT treaties by abandoning the space race by curbing military spending by
the two ACCUPLACER question types for sentence skills are:
Use the following graph of the function f(x) = x3 − 3x2 − x + 3 to answer this question:What is the average rate of change from x = −1 to x = 3?
what is the rest of the equation -5xy3+9x2y
Six months ago, you purchased a new laptop. since then, you have noticed that the battery life has been steadily going down. when it was new, a full charge last
What provides the main idea of an essay? A. the conclusion B. the title C. the thesis statement D. topic sentences
The data modeled by the box plots represent the test scores of two different Algebra classes. (d) What is the median value of each data set? (e) Compare the med
Y=(1/2)X^2+2x-1 and 3x-y=1
how did the stamp act get its name
Define the term threshold as it applies to an action potential