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
HELP ASAP WILL GIVE BRAINLY Question 19 Multiple Choice Worth 5 points) (05 03 MC) Network technologies specialist Hannah has be
nasty-shy [4]

Network technologies specialist Hannah would need to configure: C. RIP version 2 using Internet Protocol Version 4 (TCP/IPv4).

<h3>What is RIP?</h3>

RIP is an acronym for Routing Information Protocol and it can be defined as an intradomain routing protocol which is typically designed and developed based on distance vector routing.

<h3>The types of RIP.</h3>

In Computer networking, there are two main types of Routing Information Protocol (RIP) and these include:

  • RIP version 1.
  • RIP version 2.

RIP version 2 are generally designed and developed to include subnet masks unlike RIP version 1. Thus, Hannah would need to configure RIP version 2 using Internet Protocol Version 4 (TCP/IPv4) allow several machines on different subnets to communicate with each other using broadcasts.

Read more on routing protocol here: brainly.com/question/24812743

4 0
3 years ago
When using the text command, what needs to be around the word or words you<br> want to appear?
AysviL [449]

Answer:

In most programming languages "" are required around text.

Explanation:

Python: print("text")

HTML: <p>text</p>

C++: int Main() {

cout << "text" << endl;

}

Lua: print("text")

8 0
3 years ago
You are an IT technician for your company and would like to be able to:
vivado [14]

Answer:telnet

Explanation:

Is clear text ssh secure

8 0
3 years ago
Which of the following types of software is most applicable to the promotion of new products through advertising?
LenaWriter [7]

It cannot be database programs because database programs can not

store and organize data.

create graphics.

communicate data.

alleviate information overload.

It cannot be spreadsheets because a spreadsheet or worksheet is a file made of rows and columns that help sort data, arrange data easily, and calculate numerical data. What makes a spreadsheet software program unique is its ability to calculate values using mathematical formulas and the data in cells.

It cannot be word processing tools because a word processor is software or a device that allows users to create, edit, and print documents. It enables you to write text, store it electronically, display it on a screen, modify it by entering commands and characters from the keyboard, and print it.

Therefore the answer is C. Web design programs.

Hope this helps.

8 0
4 years ago
Read 2 more answers
You have posted some embarrassing photos of a friend onto the Internet. After
e-lub [12.9K]

Answer:

C

Explanation:

4 0
3 years ago
Other questions:
  • The component that allows you to make a paper-based copy of a body of text is the _____.
    12·1 answer
  • Of the measures of feasibility in the accompanying figure, ____ considers points such as "Does the proposed platform have suffic
    8·1 answer
  • A new systems development project is Pete’s first experience as a project manager, and he has led his team successfully to the p
    13·1 answer
  • You receive an offer in the mail that says you're eligible to win a cash prize if you place some stickers on a form and return i
    5·1 answer
  • If a triathlon is a sport combining three events, what do you think would be the word for a sport combining five events?
    7·1 answer
  • Which of these is NOT a reason for an IP Address?
    15·2 answers
  • In this program you will read in the number of seconds and convert it to days, hours, minutes and remaining seconds.
    8·1 answer
  • write a program that inputs 3 numbers and prints the largest input must be transformed into a integer but printed as a string​
    11·1 answer
  • What is artificial Intelligence ?
    11·2 answers
  • The discipline of building hardware architectures, operating systems, and specialized algorithms for running a program on a clus
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!