• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/32

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

32 Cards in this Set

  • Front
  • Back

The isDigit, isLetter, and isLetterOrDigit methods are members of what class?

Character

What method converts a character to uppercase?

toUpperCase

The startsWith, endsWith, and regionMatched methods are members of what class?

String

The indexOf and lastIndexOf methods are members of what class?

String

The substring, getChar, and toCharArray are members of what class?

String

This String class method performs the same operation as the + operator when used on strings

concat

The String class has several overloaded versions of a method that accepts a value of any primitive data type as its argument and returns a string representation of the value. What is the name of the method?

valueOf

If you do not pass an argument to the StringBuilder constructor, the object will have enough memory to store how many characters?

16

One of the methods that are common to both the String and StringBuilder classes is:

length

To change the value of a specific character in a StringBuilder object, use what method?

setCharAt

To delete a specific character in a StringBuilder object, use this method:

deleteCharAt

The character that separates tokens in a string is known as what?

delimiter

This String method breaks a string into tokens

string.split()

These static final variables are members of the numeric wrapper classes and hold the minimum and maximum values for a particular data type.

MIN_VALUE and MAX_VALUE

True or False: Character testing methods, such as isLetter, accept strings as arguments and test each character in the string.

False. They accept characters.

True or False: If the toUpperCase method's argument is already uppercase, it is returned as is, with no changes.

True

True or False: If toLowerCase method's argument is already lowercase, it will be inadvertently converted to uppercase.

False. It will stay lowercase

True or False: the startsWith and endsWith methods are case-sensitive.

True

True or False: There are two versions of the regionMatches method: one that is case-sensitive and one that can be case-insensitive.

True

True or False: The indexOf and lastIndexOf methods can find characters, but cannot find substrings.

True

True or False: The String class' replace method can replace individual characters, but cannot replace substrings.

True

True or False: The StringBuilder's replace method can replace individual characters, but cannot replace substrings.

False. It can replace substrings by listing the starting index, the ending index, and the string to replace it.

True or False: You can use the = operator to assign a string to a StringBuilder object.

False. You need to declare it like you would a new object with a one string constructor.

What is a wrapper class?

A class that is wrapped around a primitive data type and allows you to create objects instead of variables.

How is a substring defined?

It is a part of another string

What is a leading whitespace character. What is a trailing whitespace character?

A leading whitespace character is one that appears at the beginning of a string. A trailing whitespace character is one that appears at the end of a string.

How is the StringBuilder class different from the String class?

The StringBuilder class allows you to change the contents of a StringBuilder object, you can't change the contents of a String object

What is the process of of breaking a string into tokens called?

tokenizing

What is a regular expression?

The argument that you pass to the split method. It is a string that specifies a pattern of characters.

Why should you trim a string before tokenizing it?

To eliminate any whitespace characters from the results of the tokenizing.

What is autoboxing?

Java's process of automatically "boxing up" a value inside an object.

What is unboxing?

The process of converting a wrapper class object into a primitive type.