Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
Java How To Program
Quiz 14: Strings
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 1
Multiple Choice
A String constructor cannot be passed ________.
Question 2
Multiple Choice
Which of the following creates the string of the numbers from 1 to 1000 most efficiently?
Question 3
Multiple Choice
Which of the following is not a method of class String?
Question 4
Multiple Choice
Given the following declaration: StringBuilder buf = new StringBuilder() ; What is the capacity of buf?
Question 5
Multiple Choice
String objects are immutable.This means they ________.
Question 6
Multiple Choice
StringBuilder objects can be used in place of String objects if ________.
Question 7
Multiple Choice
Consider the statement below: StringBuilder sb1 = new StringBuilder("a toyota") ; Which of the following creates a String object with the value "toy"?
Question 8
Multiple Choice
The statement S1) equalsIgnoreCase(s4) Is equivalent to which of the following?
Question 9
Multiple Choice
Consider the examples below: a) a string. b) 'a string'. c) "a string". d) "1234". e) integer. Which could be the value of a Java variable of type String?
Question 10
Multiple Choice
Which of the following will create a String different from the other three?
Question 11
Multiple Choice
Given the following declarations: StringBuilder buffer = new StringBuilder("Testing Testing") ; Buffer.setLength(7) ; Buffer.ensureCapacity(5) ; Which of the following is true?
Question 12
Multiple Choice
Which of the following statements is true?
Question 13
Multiple Choice
To find the character at a certain index position within a String,use the method ________.
Question 14
Multiple Choice
Given the following declarations: StringBuilder buf; StringBuilder buf2 = new StringBuilder() ; String c = new String("test") ; Which of the following is not a valid StringBuilder constructor?
Question 15
Multiple Choice
An anonymous String ________.
Question 16
Multiple Choice
How many String objects are instantiated by the following code segment (not including the literals) ? String s1,output; S1 = "hello"; Output = "\nThe string reversed is: " ; For (int i = s1.length() - 1;i >= 0;i--) Output += s1.charAt(i) + " " ;