Exam 9: Text Processing and More About Wrapper Classes
Exam 1: Introduction to Computers and Java53 Questions
Exam 2: Java Fundamentals52 Questions
Exam 3: Decision Structures58 Questions
Exam 4: Loops and Files56 Questions
Exam 5: Methods56 Questions
Exam 6: A First Look at Classes58 Questions
Exam 7: Arrays and the Arraylist Class63 Questions
Exam 8: A Second Look at Classes and Objects52 Questions
Exam 9: Text Processing and More About Wrapper Classes62 Questions
Exam 10: Inheritance64 Questions
Exam 11: Exceptions and Advanced File Io59 Questions
Exam 12: Java-Fx: Gui Programming and Basic Controls42 Questions
Exam 13: Java-Fx: Advanced Controls40 Questions
Exam 14: Java-Fx: Graphics, Effects, and Media40 Questions
Exam 15: Recursion23 Questions
Exam 16: Databases40 Questions
Select questions type
What will be displayed after the following code is executed?
String str = "abc456";
For (int i = 0; i < str.length(); i++)
{
Char chr = str.CharAt(i);
If (!Character.isLetter(chr))
System.out.print(Character.toUpperCase(chr));
}
(Multiple Choice)
4.9/5
(35)
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.7/5
(33)
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.9/5
(33)
You can concatenate String objects by using the __________.
(Multiple Choice)
4.7/5
(37)
The term __________ is commonly used to refer to a string that is part of another string.
(Multiple Choice)
4.7/5
(44)
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.8/5
(34)
The process of breaking a string down into tokens is known as __________.
(Multiple Choice)
4.8/5
(42)
If str is declared as: String str = "ABCDEFGHI";
What will be returned from the following statement?
Character.toLowerCase(str.charAt(5))
(Multiple Choice)
4.7/5
(33)
What is the term used for a class that is "wrapped around" a primitive data type and allows you to create objects instead of variables?
(Multiple Choice)
4.8/5
(39)
The String class's regionMatches method performs a case-insensitive comparison.
(True/False)
4.9/5
(31)
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.8/5
(49)
Which of the following statements will print the maximum value an int variable may have?
(Multiple Choice)
4.9/5
(47)
The Character wrapper class provides numerous methods for __________.
(Multiple Choice)
4.8/5
(39)
The term used for the character that separates tokens is __________.
(Multiple Choice)
4.8/5
(37)
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
(39)
In the following statement, what data type must recField be? str.getChars(5, 10, recField, 0);
(Multiple Choice)
4.8/5
(35)
The __________ method returns a copy of the calling String object with all leading and trailing whitespace characters deleted.
(Multiple Choice)
4.8/5
(32)
What will be displayed after the following code is executed? String str1 = "The quick brown fox jumped over the lazy dog.";
String str2 = str1.substring(20, 26);
System.out.println(str2);
(Multiple Choice)
4.9/5
(31)
Which of the following statements will convert the string, str = "285" to an int?
(Multiple Choice)
4.8/5
(48)
Showing 41 - 60 of 62
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)