In the following statement, what data type must recfield be? str.getchars(5, 10, recfield, 0);

In the following statement, what data type must recfield be? str.getchars(5, 10, recfield, 0);

What would be the results of executing the following code? StringBuilder str = new StringBuilder("Little Jack Horner "); Str)append("sat on the "); Str)append("corner");

Free

Multiple Choice

If your program needs to make a lot of changes to one or more string, you might consider using objects of this class:

Free

Multiple Choice

Which of the following methods of the String class can be used to tokenize a string?

Free

Multiple Choice

What will be printed after the following code is executed? String str = "abc456"; Int m = 0; While ( m < 6 ) { If (Character.isLetter(str.charAt(m))) System.out.print( Character.toUpperCase(str.charAt(m))); M++; }

Multiple Choice

In the following statement, what data type must recField be? Str)getChars(5, 10, recField, 0);

Multiple Choice

What will be the tokens for the following code? String str = "123-456-7890"; String[] tokens = str.split("-");

Multiple Choice

When you are writing a program with String objects that may have unwanted spaces at the beginning or end of the strings, use this method to delete them.

Multiple Choice

Sometimes a string will contain a series of words or other items of data separated by spaces or other characters. In programming terms, items such as these are known as what?

Multiple Choice

When using the StringBuilder class's insert method, you can insert:

Multiple Choice

What is the term used for the character that separates tokens?

Multiple Choice

What will be the value of matches after the following code is executed? Boolean matches; String[] productCodes = {"456HI345", "3456hj"}; Matches = productCodes[0].regionMatches(true, 1, ProductCodes[1], 2, 3);

Multiple Choice

Assuming that str is declared as follows: String str = "RSTUVWXYZ"; What value will be returned from str.charAt(5)?

Multiple Choice

Look at the following statement: StringBuilder str = new StringBuilder(25); What will the StringBuilder constructor do?

Multiple Choice

What will be the value of loc after the following code is executed? Int loc; String str = "The cow jumped over the moon."; Loc = str.indexOf("ov");

Multiple Choice

The Character wrapper class provides numerous methods for:

Multiple Choice

What is term used for a class that is "wrapped around" a primitive data type and allows you to create objects instead of variables?

Multiple Choice

What will be the value of str after the following statements are executed? StringBuilder str = New StringBuilder("We have lived in Chicago, " + "Trenton, and Atlanta."); Str)replace(17, 24, "Tampa");

Multiple Choice

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

Multiple Choice

The process of breaking a string down into tokens is known as what?

Multiple Choice

This character is one that appears at the end, or right side, of a string, after the non-space characters:

Multiple Choice