Question 22
What is toLowerCase();
Ans
It convert upper case into
lower case.
Question 23
Give example of
toLowerCase()
Ans
Example Charater.toLowerCase(P) it returns
p
Question 24
What is trim()
Ans
The void space is removed from
both sides using trim().
Question 25
Give example of trim()
Ans
It "\t Good Night \n".trim() returns a new string Good Night.
Question 26
What is length()
Ans
It is used to calculate to
number of character in a string
Question 27
Give example of length
Ans
String d=”This is my book and”,
System.out.println(d.length()); it returns 19
Question 28
What is indexOf()
Ans
It is used to check the index
number of character
Question 29
Give example indexOf()
Ans
"Welcome to Java".indexOf('o') returns 4.
No comments:
Post a Comment