Exam 9: Text Processing and More About Wrapper Classes
Exam 1: Introduction to Computers and Java51 Questions
Exam 2: Java Fundamentals61 Questions
Exam 3: Decision Structures64 Questions
Exam 4: Loops and Files57 Questions
Exam 5: Methods60 Questions
Exam 6: A First Look at Classes58 Questions
Exam 7: Arrays and the Arraylist Class64 Questions
Exam 8: A Second Look at Classes and Objects50 Questions
Exam 9: Text Processing and More About Wrapper Classes60 Questions
Exam 10: Inheritance70 Questions
Exam 11: Exceptions and Advanced File IO56 Questions
Exam 12: A First Look at GUI Applications60 Questions
Exam 13: Advanced GUI Applications58 Questions
Exam 14: Applets and More54 Questions
Exam 15: Creating GUI Applications With Javafx and Scene Builder40 Questions
Exam 16: Recursion42 Questions
Exam 17: Databases48 Questions
Select questions type
When you are writing a program with String objects that may have unwanted spaces at the beginning or end of the strings, use this method to delete them.
Free
(Multiple Choice)
4.8/5
(40)
Correct Answer:
B
The term ________ commonly is used to refer to a string that is part of another string.
Free
(Multiple Choice)
4.7/5
(41)
Correct Answer:
B
This is the process of converting a wrapper class object to a primitive type.
Free
(Multiple Choice)
5.0/5
(35)
Correct Answer:
B
Which of the following statements will print the maximum value an int variable may have?
(Multiple Choice)
4.9/5
(46)
Look at the following code. Integer myNumber;
MyNumber = 5;
Which of the following is TRUE about the second statement?
(Multiple Choice)
4.9/5
(43)
To convert the double variable, d = 543.98, to a string, use the following statement:
(Multiple Choice)
4.8/5
(40)
What is the value of str after the following code has been executed?
String str;
String sourceStr = "Hey diddle, diddle, the cat and the fiddle";
Str = sourceStr.substring(12,17);
(Multiple Choice)
4.9/5
(29)
The process of breaking a string down into tokens is known as what?
(Multiple Choice)
4.9/5
(36)
To convert the string, str = "285.74" to a double, use the following statement:
(Multiple Choice)
4.8/5
(37)
Look at the following code: Integer myNumber = new Integer(5);
Int var = myNumber;
Which of the following is TRUE about the second statement?
(Multiple Choice)
4.9/5
(36)
What will be the value of matches after the following code has been executed?
Boolean matches;
String str1 = "The cow jumped over the moon.";
String str2 = "moon";
Matches = str1.endsWith(str2);
(Multiple Choice)
4.8/5
(34)
What is the term used for the character that separates tokens?
(Multiple Choice)
4.8/5
(36)
This character is one that appears at the end, or right side, of a string, after the non-space characters:
(Multiple Choice)
4.8/5
(35)
Look at the following statement: StringBuilder str = new StringBuilder(25);
What will the StringBuilder constructor do?
(Multiple Choice)
4.8/5
(34)
What will be printed after the following code is executed?
String str = "abc456";
Int m = 0;
While ( m < 6 )
{
If (!Character.isLetter(str.charAt(m)))
System.out.print(
Character.toUpperCase(str.charAt(m)));
M++;
}
(Multiple Choice)
4.9/5
(39)
Sometimes a string will contain a series of words or other items of data separated by spaces or other characters. In programming terms, items such as these are known as what?
(Multiple Choice)
4.7/5
(34)
The no-arg constructor for a StringBuilder object gives the object enough storage space to hold this many characters.
(Multiple Choice)
4.9/5
(40)
What would be the results of executing the following code?
StringBuilder str = new StringBuilder("Little Jack Horner ");
Str)append("sat on the ");
Str)append("corner");
(Multiple Choice)
4.8/5
(42)
What will be the tokens in the following statement?
String str = "red$green&blue#orange";
String[] tokens = str.split("[$&#]");
(Multiple Choice)
4.8/5
(46)
The following statement correctly creates a StringBuilder object.
StringBuilder str = "Caesar Salad";
(True/False)
4.8/5
(33)
Showing 1 - 20 of 60
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)