Java Programming - Java Strings Questions and Answers
1. String is an________
Loading...
2. import myLibrary.*;
public class ShowSomeClass
{
// code for the class...
}
What is the name of the java file containing this program?
public class ShowSomeClass
{
// code for the class...
}
What is the name of the java file containing this program?
Loading...
3. Consider the following code snippet
String river = new String('Columbiaâ€);
System.out.println(river.length());
What is printed?
String river = new String('Columbiaâ€);
System.out.println(river.length());
What is printed?
Loading...
4. : If s = "text", what is the value returned by s.length()?
Loading...
5. What is the difference between a TextArea and a TextField?
Loading...
6. Given the following code fragment:
int A[];
int i = 0;
A = new int A[4];
while (i < 4)
{
A[i] = 10;
i = i + 1;
}
What is the value of A[3]?
int A[];
int i = 0;
A = new int A[4];
while (i < 4)
{
A[i] = 10;
i = i + 1;
}
What is the value of A[3]?
Loading...
7. Given the following statement:
huey.setDouble(8.0*32.2+1.0);
What must be the data type of huey?
huey.setDouble(8.0*32.2+1.0);
What must be the data type of huey?
Loading...
8. : A compound statement is:
Loading...
9. Which of these method of String class is used to obtain character at specified index?
Loading...
10. Which of these method of String class can be used to test to strings for equality?
Loading...
Are these questions helpful for you?
Related Quizzes
- Introduction To Java
- Java Network Programming
- Java File Input Output
- Java Socket Programming
- Java Data Types
- Java Operators
- Java Strings
- Java Arrays
- Java Package And Interface
- java.lang Package
- Java Swings
- Java Applets
- Java Exception Handling
- JSP And Servlet
- Struts And Hibernate
- Java Session
- JDBC
- Java Classes And Methods
- Java Generics
- Java Multithreading
Comments: (Your feedback is valuable to us)