Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
Java Early Objects
Quiz 8: Text Processing and Wrapper Classes
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 1
Multiple Choice
The StringBuilder class's insert method allows you to insert into the calling object's string
Question 2
Multiple Choice
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?
Question 3
Multiple Choice
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) ) ; }
Question 4
Multiple Choice
Which of the following statements is not true about the following code? StringBuilder strb = New StringBuilder("Total number of parts: ") ; Strb.insert(23, 32) ;
Question 5
Multiple Choice
Which of the following statements converts a String object variable named str to an int and stores the value in the variable x?
Question 6
Multiple Choice
What will be displayed after the following code is executed? String str = "RSTUVWXYZ"; System.out.println(str.charAt(5) ) ;
Question 7
Multiple Choice
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) ;
Question 8
Multiple Choice
Which of the following import statements is required to use the StringTokenizer class?
Question 9
Multiple Choice
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) ;
Question 10
Multiple Choice
A series of words or other items of data separated by spaces or other characters are known as
Question 11
Multiple Choice
Which of the following are used as delimiters if the StringTokenizer class's constructor is called and a reference to a String object is passed as the only argument?
Question 12
Multiple Choice
What will be the tokens in the following statement? StringTokenizer st = New StringTokenizer("9-14-2014", "-", true) ;
Question 13
Multiple Choice
Which of the following statements converts a double variable named tax to a string and stores the value in the String object variable named str?
Question 14
Multiple Choice
The Character wrapper class provides numerous methods for
Question 15
Multiple Choice
Which of the following statements will display the maximum value that a double can hold?
Question 16
Multiple Choice
What will be displayed after the following code has been executed? String str1 = "The quick brown fox jumped over the lazy dog."; String str2 = str1.substring(20, 26) ; System.out.println(str2) ;
Question 17
Multiple Choice
For the following code, how many times would the while loop execute? StringTokenizer st = New StringTokenizer("Java programming is fun!") ; While (st.hasMoreTokens() ) System.out.println(st.nextToken() ) ;
Question 18
Multiple Choice
In the following statement, what data type must recField be? Str) getChars(5, 10, recField, 0) ;
Question 19
Multiple Choice
What will be displayed after the following code has been executed? Boolean matches; String str1 = "The cow jumped over the moon."; String str2 = "moon"; Matches = str1.endsWith(str2) ; System.out.println(matches) ;