Chapter 08: String Manipulation in Java

1.	What is the following methods is used to join string?
(a) getchars
(b) strcat()
(c) concat()
(d) none

2.	What will be the output of the following Statement, when executes?
System.out.println(“COMPUTER”.charAt(4));
(a)	U
(b)	P
(c)	M
(d)	None

3.	String declaration is terminated by:
(a)	+
(b)	Quotes
(c)	Semicolon
(d)	Comma

4.	Give the output of the following Statement:
System.out.println(“RAJENDRA”.length());
(a)	8
(b)	9
(c)	12
(d)	7

5.	Character literal is enclosed within:
(a)	Parenthesis
(b)	Double quotes
(c)	Single quotes
(d)	None

6.	Which of the following operators is used to concatenate two strings?
(a)	‘+’
(b)	Join
(c)	Add
(d)	+

7.	“VIDYALAYA”.substring(2,5) will result in:
(a)	DYA
(b)	YAL
(c)	ALA
(d)	LAY

8.	 What is the return type of the following method:
x.equals(y)
(a)	Yes or No
(b)	Right or wrong
(c)	True or false
(d)	None