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
A=3<br> b = 2<br> print (a ** b)<br> What is output?
Lady bird [3.3K]

Answer: ( 3**2)

Explanation: honestly I can't help you. Try google it is waiting for you with open harms.  

6 0
3 years ago
Read 2 more answers
Best practices and trends for technology integration
cluponka [151]

Answer:

Technology use must be aligned to the standards. Technology must be integrated into daily learning,

Explanation:

Technology use must be aligned to the standards. Technology must be integrated into daily learning, not used as an add-on to instruction to match personal learning needs. Students need opportunities to use technology collaboratively. Technology must support project based learning and include real-world simulations.

3 0
2 years ago
What operating system are you using? On most computers, you can answer this question by right-clicking on the "My Computer" icon
Viktor [21]

Explanation:

hbbbbhygjjjjkllkkjhkkky

5 0
3 years ago
Read 2 more answers
Difference between software developer and software engineer.
vredina [299]

Answer:

The core difference between the two jobs is that software developers are the creative force that deals with design and program implementation, while software engineers use the principles of engineering to build computer programs and applications.

Explanation:

5 0
2 years ago
A mutation is _____.
Kipish [7]

Answer:

I am explain you in image

8 0
3 years ago
Other questions:
  • Describe in one or more complete sentences how someone starting a computer repair business in a town night gain a competitive ad
    15·1 answer
  • Which of the following is the core of an operating system that maintains the computer’s clock, starts applications, and assigns
    7·1 answer
  • Which situation can result in positive population growth?
    14·1 answer
  • Consider the following scenario below and recommend a solution.
    8·1 answer
  • When did outdoor air pollution first become a significant problem?
    9·1 answer
  • Jared recently sent an email to all the members of his department asking them for their opinions about where the department shou
    11·1 answer
  • When using file explorer, the right-hand pane that shows the files and folders of the selected area is called the pane?
    7·1 answer
  • Benefits of computer in bank​
    5·1 answer
  • How to format the selected range of cells as u.s currency
    6·1 answer
  • Write a program to calculate sum of first ten natural numbers​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!