Exam 7: Characters Strings and the Stringbuilder

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

The String class ____________________ method is similar to the equals() method. As its name implies, this method ignores case when determining if two String s are equivalent.

(Short Answer)
4.8/5
(38)

  In the above code, two strings are evaluated using the equivalency operator. Why can this be a problem, and what other methods are offered by Java for working with characters and strings? In the above code, two strings are evaluated using the equivalency operator. Why can this be a problem, and what other methods are offered by Java for working with characters and strings?

(Essay)
4.9/5
(40)

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
(32)

The method header of the equals() method within the String class is ____.

(Multiple Choice)
4.9/5
(39)

A StringBuilder object contains a memory block called a _____, which might or might not contain a string.

(Multiple Choice)
5.0/5
(34)

StringBuilder greeting = new StringBuilder("Day 1"); Using the above StringBuilder , create a setCharAt() method that will change the "1" to a "2" in the String "Day 1" . Explain how the setCharAt() method operates.

(Essay)
4.8/5
(35)

The StringBuffer class is more efficient than the StringBuilder class because it can execute multiple threads during program execution.

(True/False)
4.9/5
(33)

Which of the following correctly declares and initializes a String object?

(Multiple Choice)
4.8/5
(36)
Showing 61 - 68 of 68
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)