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
Given the following, which of the statements below is not true? str.insert(8, 32);
(Multiple Choice)
4.8/5
(41)
What is the value of str after the following code has been executed?
String str;
String sourceStr = "Hey diddle, diddle, the cat
And the fiddle";
Str = sourceStr.substring(12,17);
(Multiple Choice)
4.9/5
(35)
What are the tokens in the following statement? StringTokenizer st = new StringTokenizer("9-14-2018", "-", true);
(Multiple Choice)
4.7/5
(24)
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.9/5
(38)
If a non-letter is passed to the toLowerCase or toUpperCase method, it is returned unchanged.
(True/False)
4.7/5
(36)
The __________ method of the String class can be used to tokenize a string.
(Multiple Choice)
4.9/5
(49)
The ________ character appears at the end (the right side) of a string, after the non-space characters.
(Multiple Choice)
4.8/5
(30)
The no-arg constructor for a StringBuilder object gives the object enough storage space to hold __________ characters.
(Multiple Choice)
4.8/5
(31)
The term ________ commonly is used to refer to a string that is part of another string.
(Multiple Choice)
4.9/5
(39)
The StringBuilder class's insert method allows you to insert a(n) __________ into the calling object's string.
(Multiple Choice)
4.8/5
(44)
Each of the numeric wrapper classes has a static ________ method that converts a number to a string.
(Multiple Choice)
4.9/5
(41)
In the following code, how many times will the for loop execute?
String str = ("Ben and Jerry's ice cream is great.");
String[ ] tokens = str.split(" ");
For (String s : tokens)
System.out.println(s);
(Multiple Choice)
4.9/5
(42)
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");
(Multiple Choice)
4.9/5
(38)
The following statement correctly creates a StringBuilder object.
StringBuilder str = "Tuna sandwich";
(True/False)
4.9/5
(35)
Trying to extract more tokens than exist from a StringTokenizer object will cause an error.
(True/False)
4.8/5
(38)
The String class's valueOf method accepts a string representation as an argument and returns its equivalent integer value.
(True/False)
4.7/5
(32)
What are the tokens in the following code? String str = "123-456-7890";
String[ ] tokens = str.split("-");
(Multiple Choice)
4.9/5
(40)
Which of the following statements will display the maximum value that a double can hold?
(Multiple Choice)
4.9/5
(32)
The process of converting a wrapper class object to a primitive type is known as __________.
(Multiple Choice)
4.8/5
(40)
Showing 21 - 40 of 62
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)