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
fomenos
3 years ago
11

Consider having three String variables a, b, and c. The statement c = a + b; also can be achieved by saying_____________.a. c =

a.length( ) + b.length( );b. c = (int) a + (int) b;c. c = a.concat(b);d. c = b.concat(a);e. c = a.plus(b);
Computers and Technology
1 answer:
Alik [6]3 years ago
3 0

Answer:

Option(c) i.e "c = a.concat(b); " is the correct answer to the given question.

Explanation:

In Java Programming language the concat function in the string is used to merge the two string .it is similar with the "+" operator in string means if we use "+" between the two string this will also merge the two string .

  • Following are the syntax of concat function

         string1.concat(string2);

  • For example

public class Main // main class

{

public static void main(String[] args)  // main method

{

   

    String a="san";// varible declaration

    String b="ran";// varible declaration

    String c;// varible declaration

    c=a+b;// merge the two string

   System.out.println(c);// display the string c

    c=a.concat(b);//merge the two string

 System.out.println(c);// display the string c

}

}

Output:

sanran

sanran

  • All the others options are not used to merge the string that's why the others option are incorrect.
You might be interested in
Does anyone have the GCSE 2018 Design Technology J310/01 practice paper?
Anastasy [175]

Answer:

Mark as brainliest.

Explanation:

6 0
3 years ago
PLEASE HELP ITS DRIVERS ED
sasho [114]
I will have to say the answer is.d
3 0
4 years ago
Read 2 more answers
Science Help
pishuonlain [190]
C. as carbon dioxide
5 0
3 years ago
Presentation software is the best file type for writing a research paper. <br> True <br> False
Vedmedyk [2.9K]

Answer:

False

Explanation:

Document templates such as Google Docs or Microsoft Word are most appropriate.

6 0
3 years ago
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
sleet_krkn [62]

uy ako ba yung pilipino dito hi nga kau

5 0
3 years ago
Other questions:
  • Write the following function without using the C++ string class or any functions in the standard library, including strlen(). Yo
    12·1 answer
  • What are some of the causes for error 1921 when updating?
    11·2 answers
  • Consider relations A and B. Relation A represents the entity on the ""one side"" of a one-to-many relationship; Relation B repre
    11·1 answer
  • Which one is not the future of wireless technology?
    8·1 answer
  • Describe the positive and negative effects of Internet​
    6·2 answers
  • When would you use the AutoFit to Contents option?
    15·1 answer
  • Which statement about routers is !!!FALSE!!!
    10·1 answer
  • Kinda strange, and im good
    11·2 answers
  • Explain the following IT terms Network: Packet: Router: IP address: Server: LAN: WAN: Bus topology: Ring topology: Star topology
    5·1 answer
  • I need help with my work
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!