Question: public String getRandomName() { String name = ; if (!allPicked) ) { int index = getNextIndex(); name = allNames[index]; } else { System.out.println(All names picked!);
![\{ int index = getNextIndex(); name = allNames[index]; \} else \{ System.out.println("All](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66efc0fa89e99_53866efc0fa2a701.jpg)
public String getRandomName() \{ String name = ""; if (!allPicked) ) \{ int index = getNextIndex(); name = allNames[index]; \} else \{ System.out.println("All names picked!"); \} return name; \} 1710 points Explain in your own words how the method public String getRandomName() works. Looks at other methods in the class the method calls. What is the outcome of calling the method six times. Edit View Insert Format Table 12pt Paragraph B UAQT2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
