Handling strings


Question 1: Explain the function of the given methods:

a) IndexOf( )
b) Last IndesOf( )
c) Substring( )
d) Concat( )
e) Replace( )
f) Trim( )
g) ValueOf( )

Question 2: What do you mean by StringBubber? Write different characters available with the StringBuffer?

Question 3: Explain different methods available with the String Buffer.

Question 4: Write a program to reverse the string by using StringBuffer class.

Question 5: Write down a method called
delete (String str, int m) that returns the input string with the mth element removed.

Question 6: Write down a program which will count all occurrences of a specific word.

Question 7: Write down a program that will rewrite the string in the alphabetical order. For illustration, the word "UPTEC" must be written as "CEPTU".

Question 8: Fill up the blanks:

a) ................... represents fixed length, immutable character series.

b) ................... represents growable and writeable character series.

c) ................... method replaces all the occurrences of one character with the other.

d) ................... and ................... methods are employed for changing case of characters.

e) To create an empty string, ................... constructor is called.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Handling strings
Reference No:- TGS08733

Expected delivery within 24 Hours