3 Months Free Update
3 Months Free Update
3 Months Free Update
Given the code fragment:
Which option can replace xxx to enable the code to print 135?
Given the following code:
What are the values of each element in intArr after this code has executed?
Given the code fragment:
And given the requirements:
1. Process all the elements of the array in the order of entry.
2. Process all the elements of the array in the reverse order of entry.
3. Process alternating elements of the array in the order of entry.
Which two statements are true? (Choose two.)
Given the code fragment:
Which modification enables the code fragment to print TrueDone?
Given:
What is the result? A. 0:0
100:0
B.null:0
100:0
C.0:0
100:200
D.null:null 100:null
Given the code fragment:
Which code fragment, when inserted at line n1, enables the App class to print Equal?
Given these classes:
And given this main method:
Which two options compile when placed at line n1 of the main method? (Choose two.)
Given the definitions of the Bird class and the Peacock class:
and the code fragment:
Which code snippet can be inserted to print Fly.Dance. ?
Given these two classes:
Any amount of electricity used by a customer (represented by an instance of the Customer class) must contribute to the customer's bill (represented by the member variable bill) through the useElectricity method.
An instance of the Customer class should never be able to tamper with or decrease the value of the member variable bill.
How should you write methods in the ElectricAccount class at line n1 so that the member variable bill is always equal to the value of the member variable kwh multiplied by the member variable rate?
Given this segment of code:
Which two statements, if either were true, would make the code compile? (Choose two.)
Given:
Given the code fragment:
Which two sets of actions, independently, enable the code fragment to print Fit?
Given the code fragment:
Which three lines fail to compile? (Choose three.)
Given the code fragment:
Which two code fragments can be independently inserted at line n1 to enable the code to print the elements of the array in reverse order? (Choose two.)
You are asked to develop a program for a shopping application, and you are given this information:
Which definition of the Toy class adds a valid layer of abstraction to the class hierarchy?
Given this class:
And given this main method, located in another class:
Which three lines, when inserted independently at line n1, cause the program to print a 0 balance?
Given the code fragment:
Which two modifications should you make so that the code compiles successfully? (Choose two.)
Which three statements describe the object-oriented features of the Java language? (Choose three.)