多选题Which statements describe guaranteed behavior of the garbage collection and finalization mechanisms?()AObjects are deleted when they can no longer be accessed through any reference.BThe finalize() method will eventually be called on every object.CThe finalize() method will never be called more than once on an object.DAn 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.EThe garbage collector will use a mark and sweep algorithm.

多选题
Which statements describe guaranteed behavior of the garbage collection and finalization mechanisms?()
A

Objects are deleted when they can no longer be accessed through any reference.

B

The finalize() method will eventually be called on every object.

C

The finalize() method will never be called more than once on an object.

D

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.

E

The garbage collector will use a mark and sweep algorithm.


参考解析

解析: 暂无解析

相关考题:

Which two are true?() A.A finalizer may NOT be invoked explicitly.B.The finalize method declared in class Object takes no action.C.super.finalize()is called implicitly by any over riding finalize method.D.The finalize method for a given objec twill be called no more than once by the garbage collector.E.The order in which finalize will be called on two objects is based on the order in which the two objects became finalizable.

Given:When the doSomething method is called, after which line does the Object created in line 5 become available for garbage collection?() A.Line 5B.Line 6C.Line 7D.Line 8E.Line 9F.Line 10

Which of these statements about penultimate hop popping are true?()A、It is used only for directly connected subnets or aggregate routesB、It can only be used with LDP.C、It is only used when two or more labels are stacked.D、It enables the Edge LSR to request a label pop operation from Its upstream neighborsE、It is requested through TDP using a special label value that is also called the implicit-null value.F、It is requested through LDP using a special label value that is also called the implicit-null value.

What allows the programmer to destroy an object x?()  A、 x.delete()B、 x.finalize()C、 Runtime.getRuntime().gc()D、 Explicitly setting the object’s reference to null.E、 Ensuring there are no references to the object.F、 Only the garbage collection system can destroy an object.

Which statements describe guaranteed behavior of the garbage collection and finalization mechanisms?()  A、Objects are deleted when they can no longer be accessed through any reference.B、The finalize() method will eventually be called on every object.C、The finalize() method will never be called more than once on an object.D、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.E、The garbage collector will use a mark and sweep algorithm.

Which three of these statements about penultimate hop popping are true?()A、It is used only for directly connected subnets or aggregate routes.B、It can only be used with LDP.C、It is only used when two or more labels are stacked.D、It enables the Edge LSR to request a label pop operation from its upstream neighbors.E、It is requested through TDP using a special label value that is also called the implicit-null value.F、It is requested through LDP using a special label value that is also called the implicit-null value.

Which of the following statements about variables and scope are true?() A、 Local variables defined inside a method are destroyed when the method is exited.B、 Local variables are also called automatic variables.C、 Variables defined outside a method are created when the object is constructed.D、 A method parameter variable continues to exist for as long as the object is needed in which the method is defined.

Which statement is true for the class java.util.ArrayList?()  A、 The elements in the collection are ordered.B、 The collection is guaranteed to be immutable.C、 The elements in the collection are guaranteed to be unique.D、 The elements in the collection are accessed using a unique key.E、 The elements in the collections are guaranteed to be synchronized.

Which statements about the garbage collection are true?() A、 The program developer must create a thread to be responsible for free the memory.B、 The garbage collection will check for and free memory no longer needed.C、 The garbage collection allow the program developer to explicity and immediately free the memory.D、 The garbage collection can free the memory used java object at expect time.

Which two statements are true about using the isUserInRole method to implement security in a Java EEapplication?()A、It can be invoked only from the doGet or doPost methods.B、It can be used independently of the getRemoteUser method.C、Can return "true" even when its argument is NOT defined as a valid role name in the deployment descriptor.D、Using the isUserInRole method overrides any declarative authentication related to the method in which it is invoked.

class A {  }  class Alpha {  private A myA = new A();  void dolt( A a ) {  a = null;  }  void tryIt() {  dolt( myA );  }  }  Which two statements are correct?()  A、 There are no instanced of A that will become eligible for garbage collection.B、 Explicitly setting myA to null marks that instance to be eligible for garbage collection.C、 Any call on tryIt() causes the private instance of A to be marked for garbage collection.D、 Private instances of A become eligible for garbage collection when instances of Alpha become eligible for garbage collection.

Which statement is true?()A、A class’s finalize() method CANNOT be invoked explicitly.B、super.finalize() is called implicitly by any overriding finalize() method.C、The finalize() method for a given object is called no more than once by the garbage collector.D、The order in which finalize() is called on two objects is based on the order in which the two objects became finalizable.

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 ?()A、 compaction ratio limitB、 garbage collection frequencyC、 garbage collection timesD、 fragmentation heap size

Which three statements are true?()A、A final method in class X can be abstract if and only if X is abstract.B、A protected method in class X can be overridden by any subclass of X.C、A private static method can be called only within other static methods in class X.D、A non-static public final method in class X can be overridden in any subclass of X.E、A public static method in class X can be called by a subclass of X without explicitly referencing the class X.F、A method with the same signature as a private final method in class X can be implemented in a subclass of X.G、A protected method in class X can be overridden by a subclass of X only if the subclass is in the same package as X.

单选题According to the passage, which of the following statements is TRUE?AThe American ship eventually found a port and dumped its garbage before it returned home.BThrowaway societies don’t need to transport their refuse and garbage to incinerator because they have a lot of space to put them.CThe wandering ship with garbage reflected the fact that garbage problem became very serious.DThe huge populations of rats swarm through poor neighborhood in many Western European countries because the garbage is thrown into the open dumps.

多选题Which two are true?()AA finalizer may NOT be invoked explicitly.BThe finalize method declared in class Object takes no action.Csuper.finalize()is called implicitly by any over riding finalize method.DThe finalize method for a given objec twill be called no more than once by the garbage collector.EThe order in which finalize will be called on two objects is based on the order in which the two objects became finalizable.

多选题Which statements concerning the methods notify() and notifyAll() are true?AInstances of class Thread have a method called notify().BA call to the method notify() will wake the thread that currently owns the monitor of the object.CThe method notify() is synchronized.DThe method notifyAll() is defined in class Thread.EWhen there is more than one thread waiting to obtain the monitor of an object, there is no way to be  sure which thread will be notified by the notify() method.

单选题Which statement is true?()AA class’s finalize() method CANNOT be invoked explicitly.Bsuper.finalize() is called implicitly by any overriding finalize() method.CThe finalize() method for a given object is called no more than once by the garbage collector.DThe order in which finalize() is called on two objects is based on the order in which the two objects became finalizable.

单选题What allows the programmer to destroy an object x?()A x.delete()B x.finalize()C Runtime.getRuntime().gc()D Explicitly setting the object’s reference to null.E Ensuring there are no references to the object.F Only the garbage collection system can destroy an object.

单选题Given: When the doSomething method is called, after which line does the Object created in line 5 become available for garbage collection?()A Line 5B Line 6C Line 7D Line 8E Line 9F Line 10

单选题Which statements about the garbage collection are true?()A The program developer must create a thread to be responsible for free the memory.B The garbage collection will check for and free memory no longer needed.C The garbage collection allow the program developer to explicity and immediately free the memory.D The garbage collection can free the memory used java object at expect time.

多选题class A {  }  class Alpha {  private A myA = new A();  void dolt( A a ) {  a = null;  }  void tryIt() {  dolt( myA );  }  }  Which two statements are correct?()AThere are no instanced of A that will become eligible for garbage collection.BExplicitly setting myA to null marks that instance to be eligible for garbage collection.CAny call on tryIt() causes the private instance of A to be marked for garbage collection.DPrivate instances of A become eligible for garbage collection when instances of Alpha become eligible for garbage collection.

多选题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 ?()Acompaction ratio limitBgarbage collection frequencyCgarbage collection timesDfragmentation heap size

单选题Which statement is true for the class java.util.ArrayList?()A The elements in the collection are ordered.B The collection is guaranteed to be immutable.C The elements in the collection are guaranteed to be unique.D The elements in the collection are accessed using a unique key.E The elements in the collections are guaranteed to be synchronized.

多选题Which three statements are true?()AA final method in class X can be abstract if and only if X is abstract.BA protected method in class X can be overridden by any subclass of X.CA private static method can be called only within other static methods in class X.DA non-static public final method in class X can be overridden in any subclass of X.EA public static method in class X can be called by a subclass of X without explicitly referencing the class X.FA method with the same signature as a private final method in class X can be implemented in a subclass of X.GA protected method in class X can be overridden by a subclass of X only if the subclass is in the same package as X.

多选题Which two statements are true about using the isUserInRole method to implement security in a Java EEapplication?()AIt can be invoked only from the doGet or doPost methods.BIt can be used independently of the getRemoteUser method.CCan return true even when its argument is NOT defined as a valid role name in the deployment descriptor.DUsing the isUserInRole method overrides any declarative authentication related to the method in which it is invoked.

多选题Which of the following statements about variables and scope are true?()ALocal variables defined inside a method are destroyed when the method is exited.BLocal variables are also called automatic variables.CVariables defined outside a method are created when the object is constructed.DA method parameter variable continues to exist for as long as the object is needed in which the method is defined.