Exam 8: Text Processing and Wrapper Classes

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

The term ________ commonly is used to refer to a string that is part of another string.

(Multiple Choice)
4.9/5
(41)

The String class's valueOf method accepts a string representation as an argument and returns its equivalent integer value.

(True/False)
4.9/5
(38)

The ________ method returns a copy of the calling String object, in which all leading and trailing whitespace characters have been deleted.

(Multiple Choice)
4.9/5
(39)

What will be the tokens in the following statement? StringTokenizer st = New StringTokenizer("9-14-2014", "-", true);

(Multiple Choice)
4.8/5
(35)

What will be displayed after the following statements are executed? StringBuilder strb = New StringBuilder("We have lived in Chicago, Trenton, and Atlanta."); Strb.replace(17, 24, "Tampa"); System.out.println(strb);

(Multiple Choice)
4.8/5
(33)

What will be displayed after the following code has been executed? Boolean matches; String str1 = "The cow jumped over the moon."; String str2 = "moon"; Matches = str1.endsWith(str2); System.out.println(matches);

(Multiple Choice)
5.0/5
(39)

Any ________ argument passed to the Character class's toLowerCase method or toUpperCase method is returned as it is.

(Multiple Choice)
5.0/5
(41)

For the following code, how many times would the while loop execute? StringTokenizer st = New StringTokenizer("Java programming is fun!"); While (st.hasMoreTokens()) System.out.println(st.nextToken());

(Multiple Choice)
4.9/5
(41)

What will be displayed after the following statements are executed? StringBuilder strb = new StringBuilder(12); Strb.append("The cow "); Strb.append("jumped over the "); Strb.append("moon."); System.out.println(strb);

(Multiple Choice)
4.8/5
(40)

You will cause an off-by-one error, when working with a character position within a string, if you think of the first position in a string as 1.

(True/False)
4.8/5
(42)

What will be displayed after the following statements are executed? String str = "red$green&blue#orange"; String[] tokens = str.split("[$&#]"); For (String s : tokens) System.out.print(s + " ");

(Multiple Choice)
4.8/5
(29)

The Character wrapper class provides numerous methods for

(Multiple Choice)
4.8/5
(25)

In the ________ file format, when the data in a spreadsheet is exported, each row is written to a line, and the values in the cells are separated by commas. A) comma separated value B) extensible markup language C) excel binary D) data interchange

(Short Answer)
4.8/5
(40)

Which of the following import statements is required to use the StringTokenizer class?

(Multiple Choice)
4.7/5
(34)

Which of the following statements will display the maximum value that a double can hold?

(Multiple Choice)
4.8/5
(44)

You cannot assign a value to a wrapper class object.

(True/False)
4.9/5
(40)

A series of words or other items of data separated by spaces or other characters are known as

(Multiple Choice)
4.7/5
(37)

The StringBuilder class's insert method allows you to insert into the calling object's string

(Multiple Choice)
4.8/5
(41)

Which of the following statements converts an int variable named number to a string and stores the value in the String object variable named str?

(Multiple Choice)
4.8/5
(33)

The String class's ________ method accepts a value of any primitive data type as its argument and returns a string representation of the value.

(Multiple Choice)
4.8/5
(34)
Showing 21 - 40 of 40
close modal

Filters

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