It is desirable that a certain method within a certain class

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

如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

() the gab is turned off and the door is locked before you leave home.

A、It’s sure that

B、Make sure that

C、Certain that

D、I certain that


参考答案:B

第2题:

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.


参考答案:C

第3题:

It is ______ that he has passed the examination, and I am _____ I will pass it too

A.certain; certainly

B.certain; sure

C.sure; certainly

D.certainly; surely


正确答案:B

第4题:

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?"

答案:B
解析:
考查课堂提问方式。题干中问“当在课堂上检查学生们对于某个语言点是否理解时,老师应该选择下面哪种表达方式”。B项中有代指语言点的“it’,具有目的性。同时,问题也针对每个同学,问大家是否清楚明白,具有针对性。故选B。

第5题:

Click the Exhibit button. What is the output if the main() method is run?()

A.4

B.5

C.8

D.9

E.Compilation fails.

F.An exception is thrown at runtime.

G.It is impossible to determine for certain.


参考答案:D

第6题:

He acted as if______the result of the election.

A、is certain of

B、certain

C、certain of

D、he is certain of


参考答案:C

第7题:

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.


参考答案:B

第8题:

He acted as if( )success.

A. is certain of

B. certain

C. certain of

D. he is certain of


参考答案:C

第9题:

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 area

B.she is within a special area

C.she has just departured from a special area

D.she is about to enter a special area


正确答案:A

第10题:

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

答案:D
解析:
考查名词辨析。possibility“可能性”,impossibility“不可能性”,predictability“可预测性”,teach ability“可教性”。句意为“在45分钟的课堂上对于新奇和多样化的需求势不可挡。但是,多样化不同于没有秩序.学生们趋向于喜欢一些可教性的知识,因为他们喜欢他们所依赖的已知的语言结构”。故选D。

更多相关问题