HOTSPOT
You are writing a Java console program. The program accepts command line arguments.
You need to ensure that the main method parses and handles each command line argument.
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 demonstrate your understanding of switch statements.
For each of the following code segments, select Yes if the code segment can be changed to a switch statement with up to three case statements. Otherwise, select No.
NOTE: Each correct selection is worth one point.
Hot Area:
HOTSPOT
You are writing a Java method.
The method must meet the following requirements:
Accept a String array named entries
Iterate through entries
Stop the iteration and return false if any element has more than 10 characters
Otherwise, return true
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 writing a Java method named countdown. The method must meet the following requirements:
Accept an int parameter named start
Display all numbers from start to zero in decrements of one
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 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 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:
DRAG DROP
References: http://www.tutorialspoint.com/java/java_strings.htm
Your instructor asks you to evaluate four arithmetic code segments.
What is the value of each code segment? To answer, drag the appropriate value 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:
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 should use an int data type to store the numeric value 3,000,000,000 (3 billion) so that the least amount of memory is used.
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. a short
C. a byte
D. a long