Exam 10: Text Processing and More About Wrapper Classes
Exam 1: Introduction to Computers and Java42 Questions
Exam 2: Java Fundamentals53 Questions
Exam 3: Decision Structures52 Questions
Exam 4: Loops and Files48 Questions
Exam 5: Methods50 Questions
Exam 6: A First Look at Classes49 Questions
Exam 7: A First Look at Gui Applications49 Questions
Exam 8: Arrays and the Arraylist Class52 Questions
Exam 9: A Second Look at Classes and Objects40 Questions
Exam 10: Text Processing and More About Wrapper Classes49 Questions
Exam 11: Inheritance49 Questions
Exam 12: Exceptions and Advanced File Io46 Questions
Exam 13: Advanced Gui Applications46 Questions
Exam 14: Applets and More39 Questions
Exam 15: Recursion34 Questions
Exam 16: Sorting, Searching, and Algorithm Analysis46 Questions
Exam 17: Generics50 Questions
Exam 18: Collections50 Questions
Exam 19: Array-Based Lists20 Questions
Exam 20: Linked Lists36 Questions
Exam 21: Stacks and Queues36 Questions
Exam 22: Binary Trees, Avl Trees, and Priority Queues45 Questions
Select questions type
Look at the following code. Integer myNumber = new Integer(5);
Int var = myNumber;
Which of the following is true about the second statement?
Free
(Multiple Choice)
4.8/5
(37)
Correct Answer:
C
Which of the following statements will print the maximum value an int variable may have?
Free
(Multiple Choice)
4.9/5
(42)
Correct Answer:
C
What will be the value of str after the following statements are executed? StringBuilder str =
New StringBuilder("We have lived in Chicago," +
"Trenton,and Atlanta.");
Str)replace(17,24,"Tampa");
Free
(Multiple Choice)
4.8/5
(45)
Correct Answer:
A
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.
(Multiple Choice)
4.8/5
(36)
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.9/5
(37)
If a non-letter argument is passed to the toLowerCase or toUpperCase method,the boolean value false is returned.
(True/False)
4.9/5
(40)
In a string that contains a series of words or other items of data separated by spaces or other characters,the programming term for the spaces or other characters is
(Multiple Choice)
4.8/5
(32)
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.9/5
(35)
Given the following statement,which of the following is not true? str.insert(8,32);
(Multiple Choice)
4.7/5
(32)
If str is declared as String str = "ABCDEFGHI";
What will be returned from Character.toLowerCase(str.charAt(5))?
(Multiple Choice)
4.9/5
(38)
What does the following statement do? Float number = new Float(8.8);
(Multiple Choice)
4.7/5
(38)
To convert the string,str = "285" to an int,use the following statement
(Multiple Choice)
4.8/5
(40)
In the following statement,what data type must recField be? str.getChars(5,10,recField,0);
(Multiple Choice)
4.9/5
(47)
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.8/5
(28)
To use the StringTokenizer class you must have the following import statement.
(Multiple Choice)
4.8/5
(37)
The no-arg constructor for a StringBuilder object gives the object enough storage space to hold this many characters.
(Multiple Choice)
4.8/5
(45)
Which of the following statements will print the maximum value a double variable may have?
(Multiple Choice)
4.9/5
(43)
If a non-letter is passed to the toLowerCase or toUpperCase method,it is returned unchanged.
(True/False)
4.8/5
(37)
Use the following import statement when using the Character wrapper class
(Multiple Choice)
4.8/5
(30)
Showing 1 - 20 of 49
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)