6.  What is the output of this program ?
class String_demo {
public static void main(String args[])
{
int ascii[] = { 65, 66, 67, 68};
String s = new String(ascii, 1, 3);
System.out.println(s);
}
}


ABC
BCD
CDA
ABCD


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

7.  What is the output of this program ?
class output {
public static void main(String args[])
{
String c = ‘‘ Hello World ‘‘;
String s = c.trim();
System.out.println(‘‘\’‘‘‘+s+’‘\’‘‘‘);
}
}


‘‘‘‘Hello World’‘‘‘
‘‘‘‘Hello World’‘
‘‘Hello World’‘
Hello world


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

8.  Which of these data type value is returned by equals() method of String class ?


char
int
boolean
All of the mentioned


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

9.  Which of these method of class String is used to extract a single character from a String object ?


CHARAT()
chatat()
charAt()
ChatAt()


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

10.  Which of these method of class String is used to compare two String objects for their equality ?


equals()
Equals()
isequal()
Isequal()


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report