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
bonufazy [111]
2 years ago
13

Suppose you are provided with 2 strings to your program. Your task is to join the strings together so you get a single string wi

th a space between the 2 original strings. This is a common case is coding and you will need to create your output by joining the inputs and adding the space in the middle.
# Input from the command line
import sys
string1 = sys.argv[1]
string2 = sys.argv[2]
Computers and Technology
1 answer:
Mariulka [41]2 years ago
6 0

Answer:

public class TestImport{

   public static void main(String[] args) {

       String string1 = args[1];

       String string2 = args[2];

       System.out.println(string1 +" " +string2);

   }

}

Explanation:

The solution here is to use string concatenation as has been used in this statement System.out.println(string1 +" " +string2);

When this code is run from the command line and passed atleast three command line arguments for index 0,1,2 respectively, the print statment will return the second string (that is index1) and the third argument(that is index2) with a space in-between the two string.

You might be interested in
Calvin is creating a 3D shell of a turtle. He is creating a sculpted, intricate design for the pattern he wants on the shell, bu
PSYCHO15rus [73]
A is right I did this
7 0
1 year ago
Suppose a program takes 1000 machine instructions to run from start to end, and can do that in 10 microseconds when no page faul
Tema [17]

Answer:

(10^6 + 9.9)

Explanation:

Given:

Total number of machine instructions = 1000

Number of page fault in 100 instructions = 1

Number of page faults in 1000 instructions = 10

Time to serve one page fault = 100 milliseconds

Time to serve ten page faults = 100*10 milliseconds = 1000 milliseconds = 10^6 Microseconds

Number of instructions without any page fault = 1000 - 10 = 990

Time required to run 1000 instructions = 10 Microseconds

So, time required to run 990 instructions = (10*(990/1000)) Microseconds = 9.9 Microseconds

So, the total time required to run the program = (10^6 + 9.9) Microseconds

3 0
3 years ago
Brainly, ""helping you get better grades"
leonid [27]

Answer: What do you except? All of this is user generated..

Explanation:

5 0
3 years ago
Read 2 more answers
Which of the following is not considered a flow in supply chains?
kramer
I don’t know if this helps, but here are three types of main flows: flow of material/goods, flow of money/cash, and flow of information.
5 0
2 years ago
Which math operator is used to show multiplication in a spreadsheet formula
Anna11 [10]

Astrix (*) is used to multiply

Example: 5*5 (the answer would come out as 25)

If you’re using Excel, do it in the formula bar of course.

8 0
3 years ago
Other questions:
  • Which of the following is a goal of paraphrasing and summarizing?
    14·2 answers
  • A communications system connecting two or more computers is called a(n) ________.
    7·1 answer
  • If the physical memory size is doubled without changing any of its other parameters, the number of entries in the page table
    5·1 answer
  • Microsoft word's spell checker
    7·2 answers
  • Ann needs to share information about a new hiring policy. She needs to communicate this information to more than one hundred emp
    15·2 answers
  • Explain how to number text in a document​
    7·2 answers
  • Pick one of the following scenarios and
    6·1 answer
  • Match each item with a statement below. - A popular port scanners that has the ability to use a GUI front end - Allows you to pi
    8·1 answer
  • Citations that are ______________________________ can be used to build a bibliography when needed. [Create and Modify Citation S
    15·1 answer
  • What is one problem caused by spending too much time studying at your computer? A. It increases stress and negatively affects yo
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!