HOTSPOT
You write the following code:
You need to determine the values of the data1, data2, data3, and data4 variables.
Use the drop-down menus to select the answer choice that answers each question based on the information presented in the code.
NOTE: Each correct selection is worth one point.
Hot Area:
HOTSPOT
You need to evaluate the following code. Line numbers are included for reference only.
Use the drop-down menus to select the answer choice that answers each question based on the information presented in the code. NOTE: Each correct selection is worth one point.
Hot Area:
HOTSPOT
You are writing a Java method.
The method accepts a two-dimensional String array and prints the content of each array element.
The size of each dimension of the array might be different.
How should you complete the code? To answer, select the appropriate code segments in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:
HOTSPOT
You are creating a method that converts a string representation of a number into an actual number.
The numbers passed into the method include whole numbers and fractional numbers.
How should you complete the code? To answer, select the appropriate code segments in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:
HOTSPOT
You are interviewing for a job as a Java developer. You need to evaluate the following code. Line numbers are included for reference only.
For each of the following statements, select Yes if the statement is true. Otherwise, select No. NOTE: Each correct selection is worth one point.
Hot Area:
HOTSPOT
You work for Woodgrove Bank as a Java programmer.
You need to evaluate the following class. Line numbers are included for reference only.
For each of the following statements, select Yes if the statement is true. Otherwise, select No. NOTE: Each correct selection is worth one point.
Hot Area:
HOTSPOT
You have the following code segment. Line numbers are included for reference only.
The code does not compile.
For each of the following statements, select Yes if the action is required to resolve the compilation error. Otherwise, select No.
NOTE: Each correct selection is worth one point.
Hot Area:
HOTSPOT
You work on a team that develops e-commerce applications. A member of the team creates a class named DB that connects to a database. The class contains a method named query.
You need to initiate the DB class and invoke the query method.
How should you complete the code? To answer, select the appropriate code segments in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:
HOTSPOT
You write the following Java program for Munson's Pickles and Preserves Farm. Line numbers are included for reference only.
You encounter error messages when you attempt to compile the program.
You need to ensure the program compiles successfully.
How should you complete the code? To answer, select the appropriate code segments in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:
HOTSPOT
You write the following Java program for Munson's Pickles and Preserves Farm. Line numbers are included for reference only.
You encounter error messages when you attempt to compile the program.
You need to ensure the program compiles successfully.
How should you complete the code? To answer, select the appropriate code segments in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:
DRAG DROP
You are writing a Java program that collects patient information and stores it in a database.
You need to ensure that the program stores data using the least amount of memory.
Which data type should you use to complete each variable declaration? To answer, drag the appropriate data type from the column on the left to its code segment on the right. Each data may be used once, more than once, or not at all. You
may need to drag the split bar between panes or scroll to view content.
Select and Place:
DRAG DROP
You are writing a Java method.
The program must meet the following requirements:
Accept a String parameter firstName
Display a welcome message that contains firstName
Ensure that the first letter of the name is capitalized, and the remaining letters are in lowercase
How should you complete the code? To answer, drag the appropriate code segment to the correct position. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to
view content.
NOTE: Each correct selection is worth one point.
Select and Place:
DRAG DROP
Traders hires you to write a Java program to manage account openings. To open a new account, a user must meet one the following requirements:
be over 65 years old and have a minimum annual income of 10,000
be at least 21 and have an annual income greater than 25,000
How should you complete the code? To answer, drag the appropriate operator to the correct position. Each operator may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.
Select and Place:
You need to analyze the following code segment. Line numbers are included for reference only.
What is the output of line 12 when you run printInt()?
A. 0
B. 1
C. 2
D. 3
The question requires that you evaluate the underlined text to determine if it is correct. You have the following class definition:
The logError method can be invoked by code in all classes in the same package as the Logger class.
Review the underlined text. If it makes the statement correct, select "No change is needed." If the statement is incorrect, select the answer choice that makes the statement correct.
A. No change is needed
B. only by the Logger class
C. only by the Logger class and classes in the same package that inherit from it
D. by all classes in all packages