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]
3 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]3 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
While troubleshooting a network connection problem for a coworker, you discover the computer is querying a nonexistent DNS serve
tatuchka [14]

Answer:

nslookup ifconfig.

Explanation:

The nslookup is used a number of times by network admins to troubleshoot DNS related problems. In addition, this command finds IP addresses and name servers of hosts. This utility command queries the DNS database tables from every host in a network. It then determines the host name and issues an IP. It sort of converts your domain name into an IP addresses. This command combined with ifconfig finds the correct DNS servers and assigns the correct DNS server IP.

6 0
3 years ago
Write a program that asks the user to provide a word, validate that it is a word, and print the word.
natta225 [31]

Answer:

be clearer. your question doesn't seem to be presented well

8 0
3 years ago
What are the three parts of a camera
son4ous [18]

Answer: Camera lens, Film or sensors, and body.

Explanation: I researched it.

8 0
3 years ago
Tower of Hanoi algorithm 4 disks
Sophie [7]
????is this a question
4 0
3 years ago
Read 2 more answers
Which document lists the planned dates for performing tasks and meeting goals identified in the project plan?
Mnenie [13.5K]
<span>The document is called as Project schedule. this document contains the tasks that needs to be performed, the time that is given to the perform the task, the target dates. It also contains the budget of the project and the budget can be represented task wise. This helps in performing the project in a more organized way.</span>
5 0
3 years ago
Other questions:
  • What is the time period of 1st generation of computer ???
    11·1 answer
  • ____ is an object-oriented programming language from Sun Microsystems which allows small programs called applets to be embedded
    13·1 answer
  • What types of storage can be used to access your data on another computer?
    6·2 answers
  • The computer component that makes sure that instructions are decoded and executed properly is the ___________.
    11·2 answers
  • ____ is the name of a particularly nasty automated program that attacks a network by exploiting Internet Protocol (IP) broadcast
    15·1 answer
  • Csc105 final graded project
    9·1 answer
  • What are youth oraganizations?
    7·1 answer
  • This is in government
    15·1 answer
  • What is the output?
    7·1 answer
  • Give me facts on john john son
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!