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
adell [148]
3 years ago
6

How many times is the function wordScramble() called in the given program? public class WordScramble { public static void wordSc

ramble(String rem, String scr) { if (rem.isEmpty()) { System.out.println(scr + rem); } else { for (int i = 0; i < rem.length(); ++i) { wordScramble((rem.substring(0, i) + rem.substring(i + 1, rem.length())), (scr + rem.charAt(i))); } } } public static void main(String args[]) { wordScramble("ab", ""); } } 4 2 5 3
Computers and Technology
1 answer:
Ainat [17]3 years ago
6 0

Answer:

The answer is "2"

Explanation:

  • In the given java program code, a class WordScramble is declared, inside the class, a static method wordScramble is declared, that accepts two string parameter that is "rem and scr".
  • Inside the method a conditional statement is used in the if the block it checks rem variable value is empty so, it will add rem and scr value.  Otherwise, it will go to else block in this a loop is defined, which calls the method, which calculates rem length that is 2, and this method call two times to rearrange the values.
  • In the next step main method is defined that calls wordScramble method, which passes only one argument "ab" in its first parameter.
  • This method accepts one string value, in which there are two numbers   "a and b" that's why the method will run two times.  
You might be interested in
Where is the typical location of a touchpad inside of a laptop?
butalik [34]

Answer:

Attached to the keyboard

Explanation:

Touch pad is the type of the mouse that is located on the laptop just near the keyboard or we can say that it is attached to the keyboard of the laptop. It has almost two buttons that are used for the purpose of Left and Right Click.

The touch pad is used to move the cursor to the required position on the screen of the laptop. This will work by just moving figure on the touch pad as the cursor move on the screen in the same direction of the finger..

5 0
3 years ago
Based on the Standards, the statement, "Competition for computer time during periods of high demand had become intense because o
frozen [14]

Answer:

cause

Explanation:

According to my research, I can say that based on the information provided within the question this is an example of a "cause". This refers to something that makes something else happen, and is usually stated by the word "because". For example in this situation the a "planned increase in the use of the computer by operating departments" caused a "Competition for computer time during periods of high demand to become intense".

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

3 0
3 years ago
In addition to format commands that are found in the ribbon, which option is available for more extensive formatting?
eimsori [14]

Answer:

A

Explanation:

5 0
3 years ago
⇒PLEASE HELP ME!!!!!!!!∧_∧
saveliy_v [14]
I think it might be Heading & Border
6 0
2 years ago
Read 2 more answers
Audra is creating a training document and would like to include an image that she sees on her screen that she has marked up for
kupik [55]

Answer:

the first and last one

Explanation:

give me brainilest

4 0
3 years ago
Read 2 more answers
Other questions:
  • If you’d like to have multiple italicized words in your document, how would you change the font of each of these words?
    7·2 answers
  • 3.What is deep focus, and when is it a good choice for a scene?
    8·1 answer
  • What is a geotag?
    10·1 answer
  • What kind of testing is basically checking whether a game or feature works as expected by the developers?
    10·1 answer
  • Which type of JPEG image records the most information in the digital file? Medium Low Fine Expert
    6·2 answers
  • What is an accessory?
    6·1 answer
  • What is an example of CT SO?
    9·1 answer
  • நெறி என்னும் சொல்லின் பொருள்___ *​
    14·1 answer
  • Accenture has partnered with a global construction company that specializes in building skyscrapers. The company wants better ma
    12·1 answer
  • What is bigger that terbites
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!