Exam 7: Characters, Strings and the Stringbuilder
Exam 1: Creating Your First Java Classes76 Questions
Exam 2: Using Data81 Questions
Exam 3: Using Methods, Classes and Objects79 Questions
Exam 4: More Object Concepts84 Questions
Exam 5: Making Decisions80 Questions
Exam 6: Looping77 Questions
Exam 7: Characters, Strings and the Stringbuilder82 Questions
Exam 8: Arrays77 Questions
Exam 9: Advanced Array Concepts80 Questions
Exam 10: Introduction to Inheritance78 Questions
Exam 11: Advanced Inheritance Concepts78 Questions
Exam 12: Exception Handling79 Questions
Exam 13: File Input and Output78 Questions
Exam 14: Introduction to Swing Components79 Questions
Exam 15: Using Javafx and Scene Builder65 Questions
Select questions type
Match each term with the correct statement below.
Premises:
Add characters at a specific location within a StringBuilder object
Responses:
buffer
immutable
concatenation
Correct Answer:
Premises:
Responses:
(Matching)
4.8/5
(41)
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.9/5
(39)
Match each term with the correct statement below.
Premises:
Returns the lowercase equivalent of the argument
Responses:
indexOf()
toLowerCase().
concatenation
Correct Answer:
Premises:
Responses:
(Matching)
4.8/5
(37)
System.out.println("Your name is " + yourName); The above statement is an example of ____, which is used to join String s.
(Multiple Choice)
4.8/5
(40)
Match each term with the correct statement below.
Premises:
An unnamed object
Responses:
concatenation
capacity
String variable.
Correct Answer:
Premises:
Responses:
(Matching)
4.8/5
(28)
Which of the following correctly declares and initializes a String object?
(Multiple Choice)
4.7/5
(37)
String aName = "Michael"
Using the above statement, write the length() method that will return the length of the aName String . What value will the length() method return when executed?
(Essay)
4.9/5
(32)
Match each term with the correct statement below.
Premises:
A named object of the String class
Responses:
anonymous object
concatenation
append().
Correct Answer:
Premises:
Responses:
(Matching)
4.9/5
(37)
When working with String s, it is necessary to explicitly set a String to null .
(True/False)
4.9/5
(38)
Match each term with the correct statement below.
Premises:
Add characters to the end of a StringBuilder object
Responses:
insert()
anonymous object
toLowerCase().
Correct Answer:
Premises:
Responses:
(Matching)
4.8/5
(35)
Describe how a programmer would use the two types of Character class methods (those that begin with "is" and those that begin with "to") for testing the values of characters.
(Essay)
4.9/5
(36)
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.7/5
(44)
myCounty = "Clark Jackson Scioto"
myCounty.charAt(6)
Using the above code, what will be the value of the charAt() method once the code executes? Explain how the charAt() method operates.
(Essay)
4.8/5
(39)
String firstString = "Oak Maple Pine"
String secondString = "spruce Maple elm"
firstCompare.regionMatches(4, secondString, 7, 5)
Using the above code, what will be the Boolean value after execution of the regionMatches statement? Explain how the String s are compared using the regionMatches() method.
(Essay)
4.9/5
(32)
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.9/5
(36)
Showing 21 - 40 of 82
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)