网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
单选题
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.


参考答案

参考解析
解析: 暂无解析
更多 “单选题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.” 相关考题
考题 It is ______ that he has passed the examination, and I am _____ I will pass it too A.certain; certainlyB.certain; sureC.sure; certainlyD.certainly; surely

考题 He acted as if( )success. A. is certain ofB. certainC. certain ofD. he is certain of

考题 () the gab is turned off and the door is locked before you leave home. A、It’s sure thatB、Make sure thatC、Certain thatD、I certain that

考题 He acted as if______the result of the election. A、is certain ofB、certainC、certain ofD、he is certain of

考题 You develop a serializable class for persisting objects as files.Every time an object is serialized, you have to update the database with the name of the object and location of that file.You elect to employ the OnSerialized attribute to achieve this objective.You now need to apply the OnSerialized attribute to a certain method.What should you do?()A.B.C.D.

考题 Click the Exhibit button. Given:Which statement is true if a TestException is thrown on line 3 of class B? () A.Line 33 must be called within a try block.B.The exception thrown by method1 in class A is not required to be caught.C.The method declared on line 31 must be declared to throw a RuntimeException.D.On line 5 of class A, the call to method2 of class B does not need to be placed in a try/catch block.

考题 Click the Exhibit button. What is the output if the main() method is run?() A.4B.5C.8D.9E.Compilation fails.F.An exception is thrown at runtime.G.It is impossible to determine for certain.

考题 An oil tanker,except as provided for otherwise,might discharge certain amount at certain rate of oil or oily mixtures into sea when ______.A.she is not within a special areaB.she is within a special areaC.she has just departured from a special areaD.she is about to enter a special area

考题 When checking students' understanding of a certain language point in class, which of the following utterances is a teacher expected to make? A."Is it okay?" B."Is it clear to you?" C."Are you clear?" D."Is it all right to everyone?"

考题 The need for surprise and variety within a forty five-minute lesson is also overwhelming. But variety is not the same as anarchy. Students tend to like a certain amount of___________: they appreciate a safe structure which they rely on.A.possibility B.impossibility C.predictability D.teachability

考题 ( ) is a relationship in which a word of a certain class determines the form of others in terms of certain categories. A.Concord B.Immediate constituent C.Syntagmatic relations D.Government

考题 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 theelements within that set.C、 The hashCode method for a given class can be used to test for object inequality, but NOT object equality, 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.

考题 1. public class a {  2. public void method1() {  3. try {  4. B b=new b();  5. b.method2();  6. // more code here  7. } catch (TestException te) {  8. throw new RuntimeException(te);  9. }  10. }  11. }  1. public class b {  2. public void method2() throws TestException {  3. // more code here  4. }  5. }  1. public class TestException extends Exception {  2. }  Given:  31. public void method() {  32. A a=new a();  33. a.method1();  34. }  Which is true if a TestException is thrown on line 3 of class b?()A、 Line 33 must be called within a try block.B、 The exception thrown by method1 in class a is not required to be caught.C、 The method declared on line 31 must be declared to throw a RuntimeException.D、 On line 5 of class a, the call to method2 of class b does not need to be placed in a try/catch block.

考题 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 methods from the String and StringBuffer classes modify the object on which they are called?()  A、The charAt() method of the String class.B、The toUpperCase() method of the String class.C、The replace() method of the String class.D、The reverse() method of the StringBuffer class.E、The length() method of the StringBuffer class.

考题 You are implementing a Windows Communication Foundation (WCF) client application that consumes the ICatalog and lCatalog2 service interfaces.You need to ensure that the client discovers services implementing these interfaces. The services may already be online or may come online within a 30 second time limit. How should you use WCF Discovery to accomplish this?()A、Create one FindCriteria object for each interface and set the Duration of each FindCriteria to 30 seconds. Call the FindAsync method of the DiscoveryClient class twice, one time for each of the FindCriteria objects, to search for the services.B、Create one FindCriteria object for each interface and set the Duration of each FindCnteria to two seconds. Create a loop that calls the Find method of the DiscoveryClient class to search for the services. Within each loop iteration, call the Find method of the DiscoveryClient class once for each of the FindCriteria objects. Run the loop until a service is found or 30 seconds pass.C、Create a single FindCriteria object and add both interfaces to its ContractTypeNames collection. Set the criteria's Duration to two seconds. Create a loop that calls the Find method of the DiscoveryClient class to search for the services. Within each loop iteration, call the Find method of the DiscoveryClient class to search for the services Run the loop until a service is found or 30 seconds pass.D、Create a single FindCritera object and add both interfaces to the ContractTypeNames collection. Set the Duration to 30 seconds and use the FindAsync method of the DiscoveryClient class to search for the services.

考题 单选题With VIT the start of injection may be () as the engine load is reduced within a certain range.A advancedB retardedC relayedD cut off

考题 单选题If the goods are not delivered,or delivered in a damaged condition,a claim may be ()within a period of certain years unless there is a clause to the contrary in the charter-party or bill of lading.A takenB goneC gottenD made

考题 多选题Which lines of code are valid declarations of a native method when occurring within the declaration of the following class?()    public class Qf575 {   // insert declaration of a native method here   }Anative public void setTemperature(int kelvin);Bprivate native void setTemperature(int kelvin);Cprotected int native getTemperature();Dpublic abstract native void setTemperature(int kelvin);Enative int setTemperature(int kelvin) {}

考题 单选题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 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.

考题 单选题The auctioneer may decide to sell the “lots” out of the order because _____.A he sometimes wants to confuse the buyersB he knows from experience that certain people will want to buy certain itemsC he wants to keep certain people waitingD he wants to reduce the number of buyers

考题 单选题Which methods from the String and StringBuffer classes modify the object on which they are called?()A The charAt() method of the String class.B The toUpperCase() method of the String class.C The replace() method of the String class.D The reverse() method of the StringBuffer class.E The length() method of the StringBuffer class.

考题 单选题An oil tanker,except as provided for otherwise,might discharge certain amount at certain rate of oil or oily mixtures into sea when().A she is not within a special areaB she is within a special areaC she has just departured from a special areaD she is about to enter a special area

考题 单选题Except as provided for otherwise,an oil tanker might discharge certain amount at certain rate of oil or oily mixtures into sea when().A the tanker is within 50 nautical miles from the nearest landB the tanker is no more than 50 nautical miles from the nearest landC the tanker is more than 50 nautical miles from the nearest landD the tanker is not more than 50 nautical miles from the nearest land

考题 单选题Sometimes the charter-party()that the vessel must only use safe ports within a certain area.A improvesB installsC containsD requests

考题 单选题1. public class a {  2. public void method1() {  3. try {  4. B b=new b();  5. b.method2();  6. // more code here  7. } catch (TestException te) {  8. throw new RuntimeException(te);  9. }  10. }  11. }  1. public class b {  2. public void method2() throws TestException {  3. // more code here  4. }  5. }  1. public class TestException extends Exception {  2. }  Given:  31. public void method() {  32. A a=new a();  33. a.method1();  34. }  Which is true if a TestException is thrown on line 3 of class b?()A  Line 33 must be called within a try block.B  The exception thrown by method1 in class a is not required to be caught.C  The method declared on line 31 must be declared to throw a RuntimeException.D  On line 5 of class a, the call to method2 of class b does not need to be placed in a try/catch block.

考题 多选题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 theelements within that set.CThe hashCode method for a given class can be used to test for object inequality, but NOT object equality, 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.