Exam 10: Text Processing and More About Wrapper Classes
Exam 1: Introduction to Computers and Java42 Questions
Exam 2: Java Fundamentals53 Questions
Exam 3: Decision Structures52 Questions
Exam 4: Loops and Files48 Questions
Exam 5: Methods50 Questions
Exam 6: A First Look at Classes49 Questions
Exam 7: A First Look at Gui Applications49 Questions
Exam 8: Arrays and the Arraylist Class52 Questions
Exam 9: A Second Look at Classes and Objects40 Questions
Exam 10: Text Processing and More About Wrapper Classes49 Questions
Exam 11: Inheritance49 Questions
Exam 12: Exceptions and Advanced File Io46 Questions
Exam 13: Advanced Gui Applications46 Questions
Exam 14: Applets and More39 Questions
Exam 15: Recursion34 Questions
Exam 16: Sorting, Searching, and Algorithm Analysis46 Questions
Exam 17: Generics50 Questions
Exam 18: Collections50 Questions
Exam 19: Array-Based Lists20 Questions
Exam 20: Linked Lists36 Questions
Exam 21: Stacks and Queues36 Questions
Exam 22: Binary Trees, Avl Trees, and Priority Queues45 Questions
Select questions type
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.8/5
(38)
The String class's valueOf()method accepts a value of any primitive data type as an argument and returns a string representation of the value.
(True/False)
4.8/5
(41)
What does the following statement do? Double number = new Double(8.8);
(Multiple Choice)
4.9/5
(37)
To convert the string,str = "285.74" to a double,use the following statement.
(Multiple Choice)
4.9/5
(38)
The following statement correctly creates a StringBuilder object.
StringBuilder str = "Caesar Salad";
(True/False)
4.9/5
(35)
In a string that contains a series of words or other items of data separated by spaces or other characters,the programming term for the data items is
(Multiple Choice)
4.8/5
(43)
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)
4.8/5
(33)
The String class's valueOf()method accepts a string representation as an argument and returns its equivalent integer value.
(True/False)
4.7/5
(37)
If a string has more than one character used as a delimiter,we must write a loop to determine the tokens,one for each delimiter character.
(True/False)
4.9/5
(33)
For the following code,how many times would the while loop execute? StringTokenizer strToken =
New StringTokenizer("Cars,trucks,and SUVs " +
"are all types of automobiles.");
While (strToken.hasMoreTokens())
{
System.out.println(strToken.nextToken());
}
(Multiple Choice)
4.7/5
(30)
When using the StringBuilder class's insert method,you can insert
(Multiple Choice)
4.9/5
(45)
The StringBuilder constructor used in the following statement will... StringBuilder str = new StringBuilder(25);
(Multiple Choice)
4.9/5
(38)
To convert the int variable,number to a string,use the following statement.
(Multiple Choice)
4.8/5
(41)
What will be the tokens in the following statement? StringTokenizer strToken = new StringTokenizer("123-456-7890",
"-",true);
(Multiple Choice)
4.8/5
(37)
What will be the tokens in the following statement? String str = "red$green&blue#orange";
String tokens = str.split("[$&#]");
(Multiple Choice)
4.9/5
(39)
Assuming that str is declared as follows, String str = "RSTUVWXYZ";
What value will be returned from str.charAt(5)?
(Multiple Choice)
5.0/5
(33)
If you do not specify delimiters in the StringToken constructor,which of the following cannot be a delimiter?
(Multiple Choice)
4.9/5
(33)
Showing 21 - 40 of 49
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)