Exam 7: Characters, Strings, and the Stringbuilder
Exam 1: Creating Java Programs68 Questions
Exam 2: Using Data74 Questions
Exam 3: Using Methods, Classes, and Objects68 Questions
Exam 4: More Object Concepts67 Questions
Exam 5: Making Decisions70 Questions
Exam 6: Looping72 Questions
Exam 7: Characters, Strings, and the Stringbuilder73 Questions
Exam 8: Arrays74 Questions
Exam 9: Advanced Array Concepts74 Questions
Exam 10: Introduction to Inheritance70 Questions
Exam 11: Advanced Inheritance Concepts70 Questions
Exam 12: Exception Handling65 Questions
Exam 13: File Input and Output74 Questions
Exam 14: Introduction to Swing Components74 Questions
Exam 15: Advanced Gui Topics69 Questions
Exam 16: Graphics74 Questions
Exam 17: Applets, Images, and Sound72 Questions
Select questions type
yourCounty = "Clark"
yourCounty.startsWith("Cla")
What value will be returned by the startsWith() method? Explain how the startsWith() method deals with case sensitivity.
(Essay)
4.9/5
(24)
String greeting = "Welcome Home";
Using the above String, create the String method to convert the greeting String to all uppercase. Likewise, create the String method to convert the greeting String to all lowercase.
(Essay)
4.8/5
(31)
The ____ method allows you to replace all occurrences of some character within a String.
(Multiple Choice)
4.8/5
(42)
The ____ method takes a String argument and returns its double value.
(Multiple Choice)
4.9/5
(43)
When the String class ____ method is used to compare two Strings, it provides additional information to the user in the form of an integer value.
(Multiple Choice)
4.8/5
(42)
The methods of the Character class that begin with ____ return a character that has been converted to the stated format.
(Multiple Choice)
4.8/5
(39)
StringBuilder greeting = new StringBuilder("Hello, John");
char initial = greeting.charAt(7);
Using the above code and the charAt() method, what value will be assigned to the variable initial?
(Essay)
4.8/5
(33)
In a compareTo() method, programmers often do not need specific return values but want to determine if a value is positive or negative.
(True/False)
4.8/5
(33)
The String class ____ method evaluates the contents of two String objects to determine if they are equivalent.
(Multiple Choice)
4.8/5
(42)
A ____ is a class for storing and manipulating changeable data that is composed of multiple characters.
(Multiple Choice)
4.9/5
(43)
When you declare a variable of a basic, primitive type, such as int x = 10;, the memory address where x is located holds the ____.
(Multiple Choice)
4.9/5
(34)
If you try to use an index that is less than 0 or less than the index of the last position in the StringBuilder object, you cause an error known as an exception and your program terminates.
(True/False)
4.8/5
(33)
StringBuilder greeting = new StringBuilder("Welcome home ");
phrase.insert(13, "Joe");
Using the above code and insert() method, describe how the phrase will appear after the code executes. How does the insert() method work?
(Essay)
4.8/5
(42)
Match each term with the correct statement below.
-Takes a String argument and returns its double value
(Multiple Choice)
4.8/5
(40)
To alter just one character in a StringBuilder, you can use the ____ method, which allows you to change a character at a specified position within a StringBuilder object.
(Multiple Choice)
4.9/5
(43)
The ____ is an attribute of the StringBuilder class that identifies the number of characters in the String contained in the StringBuilder.
(Multiple Choice)
4.8/5
(37)
String example1 = "";
String example2 = null;
String example3;
There is an important difference between empty Strings and null Strings. Explain the differences and why it is important when making String comparisons.
(Essay)
4.8/5
(41)
Showing 41 - 60 of 73
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)