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
The String class's valueOf() method accepts a string representation as an argument and returns its equivalent integer value.
(True/False)
4.8/5
(37)
If your program needs to make a lot of changes to one or more string, you might consider using objects of this class:
(Multiple Choice)
4.8/5
(33)
Assuming that str is declared as follows: String str = "RSTUVWXYZ";
What value will be returned from str.charAt(5)?
(Multiple Choice)
4.7/5
(41)
What would be the results of executing the following code?
StringBuilder str = new StringBuilder(12);
Str)append("The cow");
Str)append(" jumped over the ");
Str)append("moon.");
(Multiple Choice)
4.9/5
(39)
Given the following statement, which of the following is NOT true?
Str)insert(8, 32);
(Multiple Choice)
4.8/5
(33)
The wrapper classes in Java are immutable, which means that once you create an object, you cannot change the object's value.
(True/False)
4.8/5
(38)
What does the following statement do?
Double number = new Double(8.8);
(Multiple Choice)
4.8/5
(37)
What will be the value of loc after the following code is executed?
Int loc;
String str = "The cow jumped over the moon.";
Loc = str.indexOf("ov");
(Multiple Choice)
4.9/5
(37)
What is term used for a class that is "wrapped around" a primitive data type and allows you to create objects instead of variables?
(Multiple Choice)
4.9/5
(29)
Each of the numeric wrapper classes has a static ________ method that converts a number to a string.
(Multiple Choice)
4.8/5
(34)
If a non-letter is passed to the toLowerCase or toUpperCase method, it is returned unchanged.
(True/False)
4.8/5
(46)
What will be the tokens for the following code?
String str = "123-456-7890";
String[] tokens = str.split("-");
(Multiple Choice)
4.9/5
(40)
You must call a method to get the value of a wrapper class object.
(True/False)
4.9/5
(45)
When using the StringBuilder class's insert method, you can insert:
(Multiple Choice)
4.9/5
(33)
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");
(Multiple Choice)
5.0/5
(41)
If str is declared as: String str = "ABCDEFGHI";
What will be returned from Character.toLowerCase(str.charAt(5))?
(Multiple Choice)
4.8/5
(41)
In the following statement, what data type must recField be?
Str)getChars(5, 10, recField, 0);
(Multiple Choice)
4.9/5
(39)
What will be the value of matches after the following code is executed?
Boolean matches;
String[] productCodes = {"456HI345", "3456hj"};
Matches = productCodes[0].regionMatches(true, 1,
ProductCodes[1], 2, 3);
(Multiple Choice)
4.9/5
(37)
What does the following statement do?
Float number = new Float(8.8);
(Multiple Choice)
4.9/5
(37)
Showing 41 - 60 of 60
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)