网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
Given that t1 is a reference to a live thread, which is true?()
- A、The Thread.sleep() method can take t1 as an argument.
- B、The Object.notify() method can take t1 as an argument.
- C、The Thread.yield() method can take t1 as an argument.
- D、The Thread.setPriority() method can take t1 as an argument.
- E、The Object.notify() method arbitrarily chooses which thread to notify.
参考答案
更多 “Given that t1 is a reference to a live thread, which is true?()A、The Thread.sleep() method can take t1 as an argument.B、The Object.notify() method can take t1 as an argument.C、The Thread.yield() method can take t1 as an argument.D、The Thread.setPriority() method can take t1 as an argument.E、The Object.notify() method arbitrarily chooses which thread to notify.” 相关考题
考题
Can journalists take photos at the press conference to be held before the performance?A.Yes, they can. But they’ve got to take photos in a certain placeB.Yes, they can. But they’ve got to take photos in designated places.C.Yes, they can. But they have to find a suitable placeD.Yes, they can. But they’ve got to take photos at lower places.
考题
Given that t1 is a reference to a live thread, which is true?()
A.The Thread.sleep() method can take t1 as an argument.B.The Object.notify() method can take t1 as an argument.C.The Thread.yield() method can take t1 as an argument.D.The Thread.setPriority() method can take t1 as an argument.E.The Object.notify() method arbitrarily chooses which thread to notify.
考题
Given:Which two can be results?()
A. java.lang.RuntimeException: ProblemB. run.java.lang.RuntimeException: ProblemC. End of method.java.lang.RuntimeException: ProblemD. End of method.run.java.lang.RuntimeException: ProblemE. run.java.lang.RuntimeException: Problem End of method.
考题
Can you measure oil level? Which method is right, to measure ullage height or to measure oil depth?
考题
Which two statements are true about voice ports on a router? ()A、 Calls to the PSTN can be made via the use of FXO or T1/E1 trunk ports.B、 Calls to the PSTN can be made via FXS or T1/E1 trunk ports.C、 Analog and IP phones can be connected to the VoIP network via FXO or T1/E1 trunk ports.D、 Calls between analog phones that are attached to the FXS ports in a VoIP network can be completely processed by voice-enabled routers.
考题
Which of the following is true regarding the use of switches and hubs for network connectivity()。A、Switches take less time to process frames than hubs take.B、Switches do not forward broadcasts.C、Hubs can filter frames.D、Using hubs can increase the amount of bandwidth available to hosts.E、Switches increase the number of collision domains in the network.
考题
10. class Foo { 11. static void alpha() { /* more code here */ } 12. void beta() { /* more code here */ } 13. } Which two are true?()A、 Foo.beta() is a valid invocation of beta().B、 Foo.alpha() is a valid invocation of alpha().C、 Method beta() can directly call method alpha().D、 Method alpha() can directly call method beta().
考题
What is the name of the method that threads can use to pause their execution until signalled to continue by another thread? () Fill in the name of the method (do not include a parameter list).
考题
Which two of statements are true?()A、It is possible to synchronize static methods.B、When a thread has yielded as a result of yield(), it releases its locks.C、When a thread is sleeping as a result of sleep(), it releases its locks.D、The Object.wait() method can be invoked only from a synchronized context.E、The Thread.sleep() method can be invoked only from a synchronized context.F、When the thread scheduler receives a notify() request, and notifies a thread, that thread immediately releases its lock.
考题
Which statements concerning the methods notify() and notifyAll() are true? A、Instances of class Thread have a method called notify().B、A call to the method notify() will wake the thread that currently owns the monitor of the object.C、The method notify() is synchronized.D、The method notifyAll() is defined in class Thread.E、When 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.
考题
Given that t1 is a reference to a live thread, which is true?()A、The Thread.sleep() method can take t1 as an argument.B、The Object.notify() method can take t1 as an argument.C、The Thread.yield() method can take t1 as an argument.D、The Thread.setPriority() method can take t1 as an argument.E、The Object.notify() method arbitrarily chooses which thread to notify.
考题
It is desirable that a certain method within a certain class can only be accessed by classes that are defined within the same package as the class of the method. How can such restrictions be enforced?() A、Mark the method with the keyword public.B、Mark the method with the keyword protected.C、Mark the method with the keyword private.D、Mark the method with the keyword package.E、Do not mark the method with any accessibility modifiers.
考题
Which two can directly cause a thread to stop executing?() A、 Exiting from a synchronized block.B、 Calling the wait method on an object.C、 Calling the notify method on an object.D、 Calling the notifyAll method on an object.E、 Calling the setPriority method on a thread object.
考题
What can cause a thread to become non-runnable?()A、 Exiting from a synchronized block.B、 Calling the wait method on an object.C、 Calling the notify method on an object.D、 Calling the notifyAll method on an object.
考题
Which two can be used to create a new Thread?() A、 Extend java.lang.Thread and override the run method.B、 Extend java.lang.Runnable and override the start method.C、 Implement java.lang.thread and implement the run method.D、 Implement java.lang.Runnable and implement the run method.E、 Implement java.lang.Thread and implement the start method.
考题
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.
考题
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.
考题
Which two statements are true about the hashCode method?()A、The hashCode method for a given class can be used to test for object equality and object inequality for that class.B、The hashCode method is used by the java.util.SortedSet collection class to order the elements within that set.C、The hashCode method for a given class can be used to test for object inequality, but NOT objecte quality, for that class.D、The only important characteristic of the values returned by a hashCode method is that the distribution of values must follow a Gaussian distribution.E、The hashCode method is used by the java.util.HashSet collection class to group the elements within that set into hash buckets for swift retrieval.
考题
多选题Which two can directly cause a thread to stop executing?()AExiting from a synchronized block.BCalling the wait method on an object.CCalling the notify method on an object.DCalling the notifyAll method on an object.ECalling the setPriority method on a thread object.
考题
单选题It is desirable that a certain method within a certain class can only be accessed by classes that are defined within the same package as the class of the method. How can such restrictions be enforced?()A
Mark the method with the keyword public.B
Mark the method with the keyword protected.C
Mark the method with the keyword private.D
Mark the method with the keyword package.E
Do not mark the method with any accessibility modifiers.
考题
填空题What is the name of the method that threads can use to pause their execution until signalled to continue by another thread? () Fill in the name of the method (do not include a parameter list).
考题
单选题What can cause a thread to become non-runnable?()A
Exiting from a synchronized block.B
Calling the wait method on an object.C
Calling the notify method on an object.D
Calling the notifyAll method on an object.
考题
多选题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 two can be used to create a new Thread?()AExtend java.lang.Thread and override the run method.BExtend java.lang.Runnable and override the start method.CImplement java.lang.thread and implement the run method.DImplement java.lang.Runnable and implement the run method.EImplement java.lang.Thread and implement the start method.
考题
多选题Which two statements are true about the hashCode method?()AThe hashCode method for a given class can be used to test for object equality and object inequality for that class.BThe hashCode method is used by the java.util.SortedSet collection class to order the elements within that set.CThe hashCode method for a given class can be used to test for object inequality, but NOT objecte quality, for that class.DThe only important characteristic of the values returned by a hashCode method is that the distribution of values must follow a Gaussian distribution.EThe hashCode method is used by the java.util.HashSet collection class to group the elements within that set into hash buckets for swift retrieval.
考题
多选题10. class Foo { 11. static void alpha() { /* more code here */ } 12. void beta() { /* more code here */ } 13. } Which two are true?()AFoo.beta() is a valid invocation of beta().BFoo.alpha() is a valid invocation of alpha().CMethod beta() can directly call method alpha().DMethod alpha() can directly call method beta().
考题
多选题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.
热门标签
最新试卷