Which statements describe guaranteed behavior of the garbage collection and finalization mechanisms?()
第1题:
Which statements concerning the methods notify() and notifyAll() are true?
第2题:
Which statement is true for the class java.util.ArrayList?()
第3题:
Given a class whose instances, when found in a collection of objects, are sorted by using the compareTo() method, which two statements are true?()
第4题:
Which two statements are true about using the isUserInRole method to implement security in a Java EEapplication?()
第5题:
class A { } class Alpha { private A myA = new A(); void dolt( A a ) { a = null; } void tryIt() { dolt( myA ); } } Which two statements are correct?()
第6题:
Oracle JRockit JVM uses -Xns option to set nursery size when the generational garbage collection mode is used. Which two JVM properties are affected by changing its size ?()
第7题:
Which two statements are true about the hashCode method?()
第8题:
The American ship eventually found a port and dumped its garbage before it returned home.
Throwaway societies don’t need to transport their refuse and garbage to incinerator because they have a lot of space to put them.
The wandering ship with garbage reflected the fact that garbage problem became very serious.
The huge populations of rats swarm through poor neighborhood in many Western European countries because the garbage is thrown into the open dumps.
第9题:
None of these objects are eligible for garbage collection.
Only the object referenced by booch is eligible for garbage collection.
Only the object referenced by snoog is eligible for garbage collection.
Only the object referenced by snooch is eligible for garbage collection.
The objects referenced by snooch and booch are eligible for garbage collection.
第10题:
Line 5
Line 6
Line 7
Line 8
Line 9
Line 10
第11题:
There are no instanced of A that will become eligible for garbage collection.
Explicitly setting myA to null marks that instance to be eligible for garbage collection.
Any call on tryIt() causes the private instance of A to be marked for garbage collection.
Private instances of A become eligible for garbage collection when instances of Alpha become eligible for garbage collection.
第12题:
It can be invoked only from the doGet or doPost methods.
It can be used independently of the getRemoteUser method.
Can return true even when its argument is NOT defined as a valid role name in the deployment descriptor.
Using the isUserInRole method overrides any declarative authentication related to the method in which it is invoked.
第13题:
Which of the following statements about variables and scope are true?()
第14题:
Which of the following statements are true?()
第15题:
Which statements about the garbage collection are true?()
第16题:
11. class Snoochy { 12. Boochybooch; 13. public Snoochy() { booch = new Boochy(this); } 14. } 15. 16. class Boochy { 17. Snoochy snooch; 18. public Boochy(Snoochy s) { snooch = s; } 19. } And the statements: 21. public static void main(String[] args) { 22. Snoochy snoog = new Snoochy(); 23. snoog = null; 24. // more code here 25. } Which statement is true about the objects referenced by snoog, snooch, and booch immediately after line 23 executes?()
第17题:
Which statement is true?()
第18题:
Which three statements are true?()
第19题:
The equals() method determines if reference values refer to the same object.
The == operator determines if the contents and type of two separate objects match.
The equals() method returns true only when the contents of two objects match.
The class File overrides equals() to return true if the contents and type of two separate objects match.
第20题:
A class’s finalize() method CANNOT be invoked explicitly.
super.finalize() is called implicitly by any overriding finalize() method.
The finalize() method for a given object is called no more than once by the garbage collector.
The order in which finalize() is called on two objects is based on the order in which the two objects became finalizable.
第21题:
Objects are deleted when they can no longer be accessed through any reference.
The finalize() method will eventually be called on every object.
The finalize() method will never be called more than once on an object.
An object will not be garbage collected as long as it is possible for an active part of the program to access it through a reference.
The garbage collector will use a mark and sweep algorithm.
第22题:
The program developer must create a thread to be responsible for free the memory.
The garbage collection will check for and free memory no longer needed.
The garbage collection allow the program developer to explicity and immediately free the memory.
The garbage collection can free the memory used java object at expect time.
第23题:
The elements in the collection are ordered.
The collection is guaranteed to be immutable.
The elements in the collection are guaranteed to be unique.
The elements in the collection are accessed using a unique key.
The elements in the collections are guaranteed to be synchronized.