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
When an IPv6 device with no pre-configured IPv6 address powers up, it can calculate a global 128-bit IPv6 address for itself usi
RSB [31]

Answer:

True

Explanation:

IPv6 Is a later version of IP addresses, used to solve the problem of the limited number of IPv4 addresses in the network.

Just like IPv4, IPv6 can also is configured to a device statically and dynamically. Dynamic IPv6 configuration could be a stateless autoconfiguration SLAAC, a stateless DHCPV6 or a stateful DHCPV6.

The IPv6 address is configured with a prefix and a prefix length and a EUI generated 64 bit interface or a random interface id by the device.

8 0
3 years ago
The computer code behind password input can be modified to force people to change their password for security reasons. This is k
bazaltina [42]

Answer:

to remember the passwords you could either make a little rhyme to "help" remember it or you could be like everyone else and write it down on a piece of paper. you could also write the password over and over again to make it stick. a way to make a password different from an old one is to use completely different wording and completely different numbers.

Explanation:

3 0
3 years ago
When configuring an adsl installation where should you to install the dsl filters?
xxTIMURxx [149]

<span>Filter installation in ADSL setup, the DSL filters should on connections leading to an analog phone. The DSL modem and phone were share on the same jack. ADSL is a type of digital subscriber line machinery, a data communication that enables faster data transfer over copper telephone lines.</span>

5 0
3 years ago
Web design incorporates several different skills and disciplines for the production and maintenance of websites. Do you agree or
lawyer [7]

Answer:

Yes, I do agree with the given statement. A further explanation is provided below.

Explanation:

  • Web design but mostly application development were most widely included throughout an interchangeable basis, though web design seems to be officially a component of the wider website marketing classification.
  • Around to get the appropriate appearance, several applications, as well as technologies or techniques, are being utilized.

Thus the above is the right approach.

6 0
2 years ago
___ networking services make it easy for friends and family to share updates and special events with each other.\
Bogdan [553]

Answer:

Social

Explanation:

Social networking services make it easy for friends and family to share updates and special events with each other.

Have a nice day!

6 0
2 years ago
Other questions:
  • Reconstructing a noise deformed analog signal is an impossible task.
    6·1 answer
  • Help me out for this one
    12·1 answer
  • When introducing new devices to the network, the organization's security policy requires that devices be monitored to establish
    15·1 answer
  • Select the steps for adding artwork into a placeholder on a presentation slide
    11·1 answer
  • Intel® Core™ i5-7500 is one of Intel's 7th generation of microprocessors and was launched earlier in 2017 and has been used in m
    13·1 answer
  • 1| def saveUserProfile(firstName, lastName, age, height, country):
    7·1 answer
  • Generally, websites ending in .edu, .gov, and .org are less likely to be biased, or to show preference toward a certain financia
    12·1 answer
  • Write a c++ program to calculate the approximate value of pi using this series. The program takes an input n that determines the
    13·1 answer
  • Which is a linear presentation?
    10·1 answer
  • if the wide area network (wan) is supporting converged applications like voice over internet protocol (voip), which of the follo
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!