English

The String class method to join two strings is ______.

Advertisements
Advertisements

Question

The String class method to join two strings is ______.

Options

  • concat(String)

  • <string>.joint(string)

  • concat(char)

  • Concat()

MCQ
Fill in the Blanks
Advertisements

Solution

The String class method to join two strings is concat(String).

Explanation:

The String class concat() method takes the form String1.concat(String2).

shaalaa.com
  Is there an error in this question or solution?
Chapter 10: String Handling - Exercises [Page 246]

APPEARS IN

Rupa Pandit Computer Applications [English] Class 10 ICSE
Chapter 10 String Handling
Exercises | Q 1. (xii) | Page 246

RELATED QUESTIONS

Write the return data type of the following function:

endsWith( )


Write a program to initialize the seven Wonders of the World along with their locations in two different arrays. Search for the name of the country input by the user. If found, display the name of the country along with its Wonder, otherwise display “Sorry Not Found!”. 
Seven wonders — CHICHEN ITZA, CHRIST THE REDEEMER, TAJMAHAL, GREAT WALL OF CHINA, MACHU PICCHU, PETRA, COLOSSEUM
Locations — MEXICO, BRAZIL, INDIA, CHINA, PERU, JORDAN, ITALY
Example —

Country Name: INDIA     Output: INDIA-TAJMAHAL
Country Name: USA        Output: Sorry Not Found!


Define a class to accept two strings, convert them into uppercase, check and display whether two strings are equal or not, if the two strings are not equal, print the string with the highest length or print the message both the strings are of equal length.


Define a class to accept a string, convert it into lowercase and check whether the string is a palindrome or not.

A palindrome is a word that reads the same backward as forward.

Example:

madam, racecar etc.


The output of the function "COMPOSITION". substring(3, 6):


Give the output of the following String class method:

"COMMENCEMENT".lastIndexOf('M')

Give the output of the following String class method:

"devote". compareTo("DEVOTE")

int x = 98; char ch = (char)x; what is the value in ch?


The output of the statement "CONCENTRATION" indexOf('T') is ______.


The output of the statement "talent". compareTo("genius") is ______.


Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×