Java Programming Questions and answers on String in the form of MCQ. Each Question have 4 options with one correct answer.
2. import myLibrary.*;
public class ShowSomeClass
// code for the class...
What is the name of the java file containing this program?
3. Consider the following code snippet
String river = new String('Columbiaâ€);
What is printed?
4. : If s = "text", what is the value returned by s.length()?
5. What is the difference between a TextArea and a TextField?
6. Given the following code fragment:
int i = 0;
A = new int A;
while (i < 4)
A[i] = 10;
i = i + 1;
What is the value of A?
7. Given the following statement:
What must be the data type of huey?
8. : A compound statement is:
9. Which of these method of String class is used to obtain character at specified index?
10. Which of these method of String class can be used to test to strings for equality?
Are these questions helpful for you?