The command to insert a node into a queue at the head (front) of a queue is: * A
ID: 3681328 • Letter: T
Question
The command to insert a node into a queue at the head (front) of a queue is: * A. enqueue B. dequeue C. insertAt(0) D. insert E. a node cannot be inserted at the head of the queue. 3. Automatically reclaiming memory that has been dynamically allocated in Java is called: * A. housekeeping B. cleanup C. garbage collection D. wastebasket E. purge 4. What does the following statement do:assert number > = 0 : “BadNumber”
: * A. If number < 0, a BadNumber error is thrown B. If number >= 0, a BadNumber error is thrown C. If number < 0, an AssertionError is thrown with “BadNumber” as the error message. D. If number >= 0, an AssertionError is thrown with “BadNumber” as the error message. E. If number >= 0, an ProgramLogicError is thrown 5. Consider the following code and the user typed in “XYZ”, what would the value of test be?: *
A. -1 B. 0 C. 1 D. 2 E. 3 6. Consider the following program listed below. Since person is declared final, what would the result be?: *
A. The name is B. The name is Bozo C. A compile error would be generated. D. An invalid data error would be thrown. E. A null pointer exception would be thrown. 7. Consider the following code below. What would be the result?: *
A. two three four B. two three C. three four D. three E. four 8. If a constructor is not provided for a class,: * A. a compile error will occur. B. when accessed the first time, a run time error will occur. C. the class cannot be used. D. the class must be declared static. E. a default constructor will be created. 9. What is functional decomposition in JAVA?: * A. A design method that breaks a system into smaller units. B. A requirements analysis method that breaks the system into cohesive and related units. C. A design methodology that uses modular prototypes to build the complete system. D. The ability to upgrade the features of a particular module of a system with minimal impact on other modules. E. A testing methodology that tests the components of a system individually. 10. Consider the following code below. What is the result?: *
A. tom B. tom dick C. tom dick harry D. tom dick harry sam E. A compilation error will occur. 11. Consider the following code below. What is the result?: *
A. A compilation error B. A run time error C. 6 D. 9 E. 15 12. Consider the following method below. This is an example of what?: *
A. recursion B. subversion C. inheritance D. enumeration E. polymorphism 13. Which of the following is not a key concept of object-oriented programming: * A. Abstraction B. Layout C. Encapsulation D. Inheritance E. Polymorphism 14. Which of the following tells C++ to display numbers with zero decimal places?: * A. setioflags(0) B. setiosflags(zero) C. setprecision(0) D. setprecision(zero) E. setplaces(0) 15. Which of the following code snippets will produce the output of 3 6 12 24 48?: *
Choice A Choice B Choice C Choice D Choice E
Explanation / Answer
The command to insert a node into a queue at the head (front) of a queue is:E) a node cannot be inserted at the head of the queue
3.Automatically reclaiming memory that has been dynamically allocated in Java is called: Garbage collection
4) What does the following statement do:
assert number > = 0 : “BadNumber”
Ans:D). If number >= 0, an AssertionError is thrown with “BadNumber” as the error message.
5) D)2
6) B. The name is Bozo
7) C) three four
8) E) If a constructor is not provided for a class,:a default constructor will be created.
9)What is functional decomposition in JAVA A)A design method that breaks a system into smaller units.
10) C. tom dick harry
11) C. 6
12) Consider the following method below. This is an example of what?:
13. Which of the following is not a key concept of object-oriented programming:
Ans:B)Layout
14. Which of the following tells C++ to display numbers with zero decimal places
Ans:C. setprecision(0)
15. Choice E
A.)recursion