Exam 8: Text Processing and Wrapper Classes

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

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

(True/False)
4.9/5
(85)

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

(Multiple Choice)
4.7/5
(77)

The __________ class is the wrapper class for the char data type.

(Multiple Choice)
5.0/5
(77)

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)
5.0/5
(81)

In the __________ file format, when data in a spreadsheet is exported, each row is written to a line and commas are used to separate the values in the cells.

(Multiple Choice)
4.9/5
(56)

The Character wrapper class provides numerous methods for

(Multiple Choice)
4.9/5
(68)

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

(Multiple Choice)
4.9/5
(69)

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

(Multiple Choice)
4.9/5
(74)

Trying to extract more tokens than exist from a StringTokenizer object will cause an error.

(True/False)
4.9/5
(79)

Most of the String comparison methods are case sensitive.

(True/False)
4.9/5
(81)

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

(Multiple Choice)
4.8/5
(67)

The __________ method returns a copy of the calling String object with all leading and trailing whitespace characters deleted.

(Multiple Choice)
4.7/5
(88)

You can concatenate String objects by using the

(Multiple Choice)
4.8/5
(77)

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

(True/False)
4.8/5
(92)

Given the following code, how many times will the while loop be executed? StringTokenizer st = new StringTokenizer("Java programming is fun!"); While (st.hasMoreTokens()) System.out.println(st.nextToken());

(Multiple Choice)
4.9/5
(74)

Which of the following statements converts a double variable named tax to a string and stores the value in the String object named str?

(Multiple Choice)
4.8/5
(75)

What will be the value of position after the following code is executed? int position; String str = "The cow jumped over the moon."; Position = str.lastIndexOf("ov", 14);

(Multiple Choice)
4.9/5
(77)

What will be displayed after the following code is executed? String str = "RSTUVWXYZ"; System.out.println(str.charAt(5));

(Multiple Choice)
4.7/5
(74)

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.9/5
(80)

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

(Multiple Choice)
4.9/5
(77)
Showing 21 - 40 of 40
close modal

Filters

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