Exam 14: Fundamentals of Characters and Strings

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

To find the character at a certain index position within a String, use the method ________.

(Multiple Choice)
4.7/5
(33)

A String constructor cannot be passed ________.

(Multiple Choice)
4.8/5
(39)

The String method substring returns ________.

(Multiple Choice)
4.8/5
(43)

Given the following declarations: StringBuilder buffer = new StringBuilder("Testing Testing"); Buffer.setLength(7); Buffer.ensureCapacity(5); Which of the following is true?

(Multiple Choice)
4.8/5
(34)

Consider the Java segment: String line1 = new String("c = 1 + 2 + 3") ; StringTokenizer tok = new StringTokenizer(line1, "+="); String foo = tok.nextToken(); String bar = tok.nextToken(); The values of foo and bar are:

(Multiple Choice)
4.7/5
(39)

Consider the Java segment: String line1 = new String("c = 1 + 2 + 3") ; StringTokenizer tok = new StringTokenizer(line1); Int count = tok.countTokens(); The value of count is ________.

(Multiple Choice)
4.7/5
(40)
Showing 21 - 26 of 26
close modal

Filters

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