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
Ally typed a business letters she most likely used a
Zarrin [17]

Answer:

Ally typed a business letters she most likely used a  <u>Word Processor</u>.

Explanation:

Word processors are the tools that are used to process the text in terms of formatting, printing and editing the text document. These programs or software are used to write the text document with ease.

Microsoft word and word perfect are the examples of the word processors.

We can write the text on note pad as well, but we cannot apply different fonts style, size and formatting techniques on that application. Word processors provide a lot of fonts styles and formatting options to make the document appealing.

6 0
3 years ago
1:A presentation program which is developed by Microsoft
LekaFEV [45]
Option 3: PowerPoint.
4 0
3 years ago
Read 2 more answers
Which IP QoS mechanism involves prioritizing traffic? Group of answer choices IntServ RSVP COPS DiffServ None of the above
murzikaleks [220]

Answer:

DiffServ

Explanation:

The IP QoS which is fully known as QUALITY OF SERVICE mechanism that involves prioritizing traffic is DIFFERENTIATED SERVICES (DiffServ).

DIFFERENTIATED SERVICES help to differentiate ,arrange ,manage, control and focus on network traffic that are of great significance or important first before network that are less important or by their order of importance in order to provide quality of service and to avoid network traffic congestion which may want to reduce the quality of service when their is to much load on the network .

8 0
3 years ago
Explain the importance of understanding plagiarism, copyright, and fair use during a time when some much of your schoolwork is d
kow [346]

Answer:

Firstly, it is unethical because it is a form of theft. By taking the ideas and words of others and pretending they are your own, you are stealing someone else's intellectual property. Secondly, it is unethical because the plagiariser subsequently benefits from this theft.

Explanation:

I hope this helps! Have a good day.

8 0
3 years ago
A menu within a menu is called what?​
Aneli [31]

Answer:

a submenu

Explanation:

a menu inside a menu is called a submenu or recursive menu

4 0
3 years ago
Other questions:
  • A ________ restricts the number of a certain type of product that can be imported into a country.
    5·1 answer
  • What is the system of phonographic disc recordings paired with a projector called?
    9·1 answer
  • What has information technology made piracy possible?
    14·1 answer
  • Write a parent program to fork(2) n processes where n is passed tothe program on the command line, and n can be from 1 to 10. Al
    12·1 answer
  • is a private connection of LANs and WANs that belongs to an organization, and is designed to be accessible only by the members a
    14·1 answer
  • Match each word to its correct meaning.
    11·1 answer
  • For BitTorrent, which of the following is true:
    6·1 answer
  • Có n chiếc kẹo và m em bé. Hãy viết chương trình nhập vào hai số nguyên dương n, m và kiểm tra n chiếc kẹo có chia đều được cho
    11·1 answer
  • Types of digital divide ​
    15·1 answer
  • Complete the following sentences using each of the words provided ONCE only. KEYBOARD DESKTOP STORE PRINTER COMPUTER MOUSE MONIT
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!