Exam 8: Text Processing and Wrapper Classes
Exam 1: Introduction to Computers and Java40 Questions
Exam 2: Java Fundamentals40 Questions
Exam 3: A First Look at Classes and Objects40 Questions
Exam 4: Decision Structures42 Questions
Exam 5: Loops and Files40 Questions
Exam 6: A Second Look at Classes and Objects40 Questions
Exam 7: Arrays and the Arraylist Class40 Questions
Exam 8: Text Processing and Wrapper Classes40 Questions
Exam 9: Inheritance40 Questions
Exam 10: Exceptions and Advanced File Io40 Questions
Exam 11: Java-Fx: Gui Programming and Basic Controls40 Questions
Exam 12: Java-Fx: Advanced Controls40 Questions
Exam 13: Java-Fx: Graphics, Effects, and Media40 Questions
Exam 14: Recursion24 Questions
Exam 15: Databases40 Questions
Select questions type
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)
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)
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 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
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)